How to switch/disable functionality of fn keys on Ubuntu - USB keyboard

30,810

Solution 1

I found a software solution.

clone the following program from github:

git clone https://github.com/lentinj/tp-compact-keyboard.git

compile to following program:

cd tp-compact-keyboard/tp-compact-usb-keyboard
make
sudo ./tp-compact-usb-keyboard /dev/hidraw1

Maybe some errors are shown when you execute the program.

This program sent 2 keystrokes to the keyboard (0x05 and 0x01).

i think, you can't press them physically:

http://www.kbdedit.com/manual/low_level_vk_list.html

They are mapped to special keys.

this is only a temporary solution - after a reboot this settings are gone.

maybe you create a cronjob to fix it permanently:

http://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/

Solution 2

enter image description here

this is the best solution what i found ;-)

Share:
30,810

Related videos on Youtube

Tomasz Cy-man
Author by

Tomasz Cy-man

im just learning

Updated on September 18, 2022

Comments

  • Tomasz Cy-man
    Tomasz Cy-man over 1 year

    Hi I have a problem with my new USB Lenovo keyboard, I can't (don't know how) switch Fn keys in Linux, on windows it was very easy.

    But I don't know what I can do on Linux to switch Fn keys (or disable), do you know any solution? I need standard functions of F1 through F12...

  • Adversus
    Adversus over 8 years
    You will be happy to know that there is someone else with the exact same solution out there :D Thanks for the pic, I was starting to think of which small heavy object I could use to keep this key pressed. All that for a keyboard of very average quality...
  • Maytham
    Maytham over 8 years
    FN+ESC will only work directly on the laptop not this keyboard, the keyboard miss also on/off switch I think the developer of this keyboard was fool.
  • MaCXyLo
    MaCXyLo almost 8 years
    PS: Model-No: SK-8821 Bus 002 Device 002: ID 17ef:6018 Lenovo
  • supervacuo
    supervacuo almost 8 years
    same keyboard, also works for me! +1 :)
  • raviteja
    raviteja over 6 years
    "Smart" engineers from lenovo broke that solution. Now the Fn key is between control and windows keys on the left of space bar. A paper blocker or heavy object are definitely a no go at that place. Actually putting the Fn key there is really awkward because it's very easy to mistake it with Windows key. I'm considering buying another (non lenovo) keyboard :-(
  • erjoalgo
    erjoalgo almost 4 years
    solaar installed via pip worked for me with the "K400 Plus" model. example: solaar config 1 fn-swap off
  • fikipollo
    fikipollo over 3 years
    solaar doesn't work for Lenovo SK-8821, it looks like this tools is intended to be used with Logitech devices
  • fikipollo
    fikipollo over 3 years
    Worked for Lenovo SK-8821 in Xubuntu 16.04
  • goo
    goo about 2 years
    This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. You can also add a bounty to draw more attention to this question. - From Review