xev
terminal command.
man page :
Xev creates a window and then asks the X server to send it_events_whenever anything happens to the window (such as it being moved, resized, typed in, clicked in, etc.). You can also attach it to an existing window. Useful for seeing what causes events to occur and to display the information that they contain; it is essentially a debugging and development tool
https://www.commandlinux.com/man-page/man1/xev.1.html
==displays the keyboard events that are processed when you press a key==
Er wordt veel gelogd , zoek naar het KeyPress event.
voorbeelden
scrolllock
KeyPress event, serial 38, synthetic NO, window 0x5c00001,
root 0x79d, subw 0x0, time 546413156, (-420,157), root:(1147,585),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x5c00001,
root 0x79d, subw 0x0, time 546413220, (-420,157), root:(1147,585),
state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Het interessant gedeelte is op de tweede lijn :
keycode 78 (keysym 0xff14, Scroll_Lock ),
vermeld de keycode en de action die er aan toegewezen is
capslock :
KeyPress event, serial 38, synthetic NO, window 0x5c00001,
root 0x79d, subw 0x0, time 546432612, (-420,157), root:(1147,585),
state 0x10, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
==> disable overwrite mode én behoud van copy/ paste met shift / ctrl + ins
is enkel mogelijk als je kan bijhouden dat NET VOOR het indrukken van insert de shift toest werd ingedrukt en blijft
insert
KeyPress event, serial 35, synthetic NO, window 0xa800001,
root 0x79d, subw 0x0, time 1174492910, (135,140), root:(996,594),
state 0x10, keycode 118 (keysym 0xff63, Insert), same_screen YES,
shift + insert
KeyPress event, serial 38, synthetic NO, window 0xa800001,
root 0x79d, subw 0x0, time 1174701982, (-57,-260), root:(804,194),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0xa800001,
root 0x79d, subw 0x0, time 1174702286, (-57,-260), root:(804,194),
state 0x11, keycode 118 (keysym 0xff63, Insert), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0xa800001,
root 0x79d, subw 0x0, time 1174702366, (-57,-260), root:(804,194),
state 0x11, keycode 118 (keysym 0xff63, Insert), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0xa800001,
root 0x79d, subw 0x0, time 1174702558, (-57,-260), root:(804,194),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False