I bought compact keyboard. F1 = Fn + 1 and F2 = Fn + 2 ...
But F1-F12 keys don't work on my Ubuntu 16.04. For example F1 makes brightness up. I checked keycodes of F1-F12 keys and they are invalid. So F1 returns 232 keycode (instead 67).
I tried fix it using: xmodmap -e "keycode 232 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1"
But it didn't help. F1 still change brightness. I tried remap other F1-F12 keys and no results. Xmodmap works only for non functional keys.
Is it possible to fix F1-F12 keys? (Swap keycodes?)
Xmodmap configured correct but F1 still change brightness:
$ xmodmap -e "keycode 232 = F1 F1 F1 XF86Switch_VT_1" # IT DON'T HELP!!
$ xmodmap -pke # everything is OK!
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1
keycode 232 = F1 F1 F1 XF86Switch_VT_1
$xev # take a look: XKeysymToKeycode = 67... F1... everything is OK again...
KeyRelease event, serial 40, synthetic NO, window 0x5000001,
root 0xf5, subw 0x0, time 921326, (236,-87), root:(236,403),
state 0x0, keycode 232 (keysym 0xffbe, F1), same_screen YES,
XKeysymToKeycode returns keycode: 67
XLookupString gives 0 bytes:
XFilterEvent returns: False
$sudo evtest
Event: time 1497517949.369064, -------------- SYN_REPORT ------------
Event: time 1497517949.458895, type 1 (EV_KEY), code 224 (KEY_BRIGHTNESSDOWN), value 0
$ setxkbmap -print
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete+ledscroll(group_lock)" };
xkb_symbols { include "pc+us+inet(evdev)+capslock(swapescape)" };
xkb_geometry { include "pc(pc105)" };
};
P.S. Also F1-F12 work properly on Windows.
Update:
Thank you @dirkt. Please take a look at the details:
- I use Ubuntu 16.04.1 LTS Unity
/dev/input/event11: RK61 Bluetooth keyboard
sudo lsof /dev/input/event11
output: acpid, Xorgevtest --grab /dev/input/eventX
result: you are right, because the brightness of the Laptop screen stay the same (I've pressed Fn + 1 => F1)!
Trying to kill acpid process:
sudo kill 757
// killing acpid processsudo lsof /dev/input/event11
output: Xorg // OK acpid killed- Pressing F1 -> Brightness is changing! // FAIL
Here is my rdesc file: https://pastebin.com/vxDvwMwr
Here is the hexdump: https:// pastebin.com/eT9mNnGV
Also I tried to change keycode via xkbcomp
and it doesn't help.
Please write any thoughts. Thank you!
XkbLayout
/XkbVariant
/XkbModel
/ whatever inxorg.conf
. You should be able to find the proper values if you do a search forX11
and your keyboard's model.xmodmap
only works for keycodes less 256, but that shouldn't be a problem for 232. And 232 is indeed mapped toXF86MonBrightnessDown
, so remapping should make it work. Can you verify withxmodmap -pke
that the new mapping is installed, and withevtest
(as root) that you really get keycode 232 for F1? What are the keycodes for the other F-keys? 233-243? What's the output ofsetxkbmap -print
?