Fix menu key handling so that message is sent only when pressed alone

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8987 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2004-09-17 08:39:14 +00:00
parent 19644c521d
commit 08acc659ec

View File

@ -628,6 +628,22 @@ KeyboardInputDevice::DeviceWatcher(void *arg)
LOG(" %Ld, %02x, %02lx\n", timestamp, is_keydown, keycode);
if (is_keydown
&& (keycode == 0x68) ) { // MENU KEY for OpenTracker 5.2.0+
bool nokey = true;
for (int32 i=0; i<16; i++)
if (states[i] != 0) {
nokey = false;
break;
}
if (nokey) {
BMessenger msger("application/x-vnd.Be-TSKB");
if (msger.IsValid())
msger.SendMessage('BeMn');
}
}
if (is_keydown)
states[(keycode)>>3] |= (1 << (7 - (keycode & 0x7)));
else
@ -646,12 +662,6 @@ KeyboardInputDevice::DeviceWatcher(void *arg)
LOG("kCancelTimer : OK\n");
}
if (is_keydown
&& (keycode == 0x68)) { // MENU KEY for OpenTracker 5.2.0+
BMessenger("application/x-vnd.Be-TSKB").SendMessage('BeMn');
}
uint32 modifiers = keymap->Modifier(keycode);
if (modifiers
&& ( !(modifiers & (B_CAPS_LOCK | B_NUM_LOCK | B_SCROLL_LOCK))