keyboard FN keys send ctrl+a, ctrl+c, ctrl+v instead of unique events
1
vote
0
answers
84
views
I have a keyboard whose F2, F3, F4 keys send
ctrl+a
, ctrl+c
, ctrl+v
events respectively instead of a unique keycode which could be remapped easily using xmodmap keycode mapping.
My goal is to use the keyboard's function keys as function keys instead of media keys, without having to press the keyboard's Fn modifier. The keyboard doesn't appear to support a built-in FN-switch to send FN keys by default.
How can I achieve this mapping?
Looking at the xev logs, the events appear indistinguishable:
Real ctrl+a
keypress:
KeyPress event, serial 33, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59266583, (648,900), root:(648,900),
state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 36, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59266869, (647,899), root:(648,900),
state 0x4, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (01) ""
XmbLookupString gives 1 bytes: (01) ""
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59266989, (647,899), root:(648,900),
state 0x4, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (01) ""
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59266989, (647,899), root:(648,900),
state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XFilterEvent returns: False
Pressing the F2 key:
KeyPress event, serial 33, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59337346, (648,900), root:(648,900),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59337346, (648,900), root:(648,900),
state 0x4, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (01) ""
XmbLookupString gives 1 bytes: (01) ""
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59337451, (648,900), root:(648,900),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x2a00001,
root 0x79a, subw 0x0, time 59337451, (648,900), root:(648,900),
state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False
The keyboard's brand is listed as EOENKK.
Output of bluetoothctl info
:
[Bluetooth Keyboard]# info 15:10:40:4F:00:07
Device 15:10:40:4F:00:07 (public)
Name: Bluetooth Keyboard
Alias: Bluetooth Keyboard
Appearance: 0x03c1
Icon: input-keyboard
Paired: yes
Bonded: yes
Trusted: no
Blocked: no
Connected: yes
WakeAllowed: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000ff50-0000-1000-8000-00805f9b34fb)
Modalias: usb:v04E8p7021d0300
ManufacturerData Key: 0x4b51
ManufacturerData Value:
49 45 IE
[Bluetooth Keyboard]#
A picture of the keyboard: 
Asked by ealfonso
(993 rep)
Oct 8, 2023, 09:55 PM
Last activity: Oct 9, 2023, 04:44 PM
Last activity: Oct 9, 2023, 04:44 PM