I have a Thinkpad T460s with Kubuntu 20.04, and I use a Nacodex K680T keyboard that shares the number row with the function keys, F[1-12].
The function keys are selected by hitting a 'func' key in the bottom right of the keyboard.
Unfortunately I can't use the F[1-12] keys because every time I hit 'func' and a key in the number row, it engages laptop hotkeys: media keys, brightness, volume, etc.
Does anyone know how to turn off the hotkeys? I need my F[1-12] more than I need to control my brightness.
Update: I have more information - I've installed screenkey
and I see that the func+num row is triggering XF86KbdBrightnessDown
etc. Hopefully that information will be useful for someone who can tell me how to get rid of this problem.
I tried to create an ESXi boot USB from KVM and I couldn't hit F11 to get through the prompts, even inside the VM. So it's beyond refreshing a web page or entering Chrome dev tools with a single key at this point. This is creating a major usability issue for me.
I'm going to try checking the BIOS to see if the keys have been redirected, since the internal keyboard isn't registering F[1-12] either - so that leads me to believe it's a BIOS setting that got flipped somehow (don't remember doing it, but you never know...)
Oh, and I've tried combinations of [left/right] ctrl-func, alt-func, shift--func, shift-[alt/ctrl]-func - none of them do anything to help.
left ctrl-func locks the function keys on the K680T but they don't behave any differently (besides eliminating the number row without a func keypress).
I also have that same keyboard. Your script works well under X11, but not Wayland, so I spent some more time on this. It turns out that the keyboard reports to the system as an Apple keyboard, even in Windows mode. Run lsusb and you'll see Apple as the vendor.
The above command changes the behavior of the K680T's function keys to what you'd expect. This will, of course, also affect real Apple keyboards.
You can also add something to modprobe.d to handle this automatically on boot. Make a file called /etc/modprobe.d/50-hid_apple.conf with the following contents:
Update your initramfs and you should be good to go.
The easiest solution I found for this after:
acpi_osi=
,acpi_osi=Windows
, andacpi_osi=Linux
inGRUB_CMDLINE_LINUX_DEFAULT
enabled/disabled fn as primary function
(whichenabled
in my BIOS means to treat as normal F[1-12] key, opposite of what a Lenovo support reference stated)X11 xkb
, hoping I could figure out which key thefunc
key is (since it doesn't register inscreenkey
, but severalXF86
keys did that weren't in/usr/share/X11/xkb/symbols/pc
)Was when I stumbled across this barebones
xmodmap
command script:Reference: How to disable multimedia keys entirely? 18.04 LTS
The xmodmap keycodes don't correspond to any references I've found online, or codes listed in
screenkey
,xev
oracpi_listen
But I noticed you can print out a current mapping with
xmodmap -pk
- so I used:$ xmodmap -pk | grep Brightness
to find F1 and F2, since they were missing from the AskUbuntu answer referenced above, but were mapped to
XF86BrightnessDown
andXF86BrightnessUp
respectively. So that pointed me in the direction of learning they were codes232
and233
, and I filled in the last two keys.That might be useful for configuration for someone else with a different keyboard whose keycodes don't match mine.
An
xmodmap
script is nice in the sense that it doesn't modify anything too confusing, system-reliant, or difficult to revert, all I have to do is invoke the script or set it to run on login.