Support for locks
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8953 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -613,12 +613,15 @@ KeyboardInputDevice::DeviceWatcher(void *arg)
|
|||||||
states[(keycode)>>3] &= (!(1 << (7 - ((keycode) & 0x7))));
|
states[(keycode)>>3] &= (!(1 << (7 - ((keycode) & 0x7))));
|
||||||
|
|
||||||
uint32 modifiers = keymap->Modifier(keycode);
|
uint32 modifiers = keymap->Modifier(keycode);
|
||||||
if (modifiers) {
|
if (modifiers
|
||||||
|
&& ( !(modifiers & (B_CAPS_LOCK | B_NUM_LOCK | B_SCROLL_LOCK))
|
||||||
|
|| at_kbd->is_keydown)) {
|
||||||
BMessage *msg = new BMessage;
|
BMessage *msg = new BMessage;
|
||||||
msg->AddInt64("when", at_kbd->timestamp);
|
msg->AddInt64("when", at_kbd->timestamp);
|
||||||
msg->what = B_MODIFIERS_CHANGED;
|
msg->what = B_MODIFIERS_CHANGED;
|
||||||
msg->AddInt32("be:old_modifiers", currentModifiers);
|
msg->AddInt32("be:old_modifiers", currentModifiers);
|
||||||
if (at_kbd->is_keydown)
|
if ((at_kbd->is_keydown && !(modifiers & (B_CAPS_LOCK | B_NUM_LOCK | B_SCROLL_LOCK)))
|
||||||
|
|| (at_kbd->is_keydown && !(currentModifiers & modifiers)))
|
||||||
currentModifiers |= modifiers;
|
currentModifiers |= modifiers;
|
||||||
else
|
else
|
||||||
currentModifiers &= !modifiers;
|
currentModifiers &= !modifiers;
|
||||||
|
|||||||
Reference in New Issue
Block a user