Input: put ledstate in the keyboard notifier
Led state should be part of the key event, like shiftstate, and not grabbed asynchronously after the fact. [samuel.thibault@ens-lyon.org: various fixes] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
76d057ce5a
commit
0beb4f6f29
@ -1237,6 +1237,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
}
|
||||
|
||||
param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
|
||||
param.ledstate = kbd->ledflagstate;
|
||||
key_map = key_maps[shift_final];
|
||||
|
||||
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_KEYCODE, ¶m) == NOTIFY_STOP || !key_map) {
|
||||
@ -1285,6 +1286,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
|
||||
(*k_handler[type])(vc, keysym & 0xff, !down);
|
||||
|
||||
param.ledstate = kbd->ledflagstate;
|
||||
atomic_notifier_call_chain(&keyboard_notifier_list, KBD_POST_KEYSYM, ¶m);
|
||||
|
||||
if (type != KT_SLOCK)
|
||||
|
Reference in New Issue
Block a user