Ubuntu – How to program Logitech function keys

function keyskeyboardlogitech

most Logitech keyboards have function keys and by pressing the FN button and one of F1 to F12 they perform some specific function.

In Windows, for example with "SetPoint", you can change their functionality. As an example :

setpoint screen


I'm not talking about changing shortcuts. some of these function keys (common keys like Home, email, etc..) are known in Ubuntu. for example ubuntu known FN + F1 as HomePage, but some special function keys like [in my case] Flip, Show Desktop and other functions that designed for windows, known as combination of Super with another key. for example ubuntu known [in my case] FN + F6, that represent show desktop, as Super + D.

The question is "How could I define them in ubuntu as a new key?" Is it possible?


P.S:

  1. I read related questions and their answers, but I didn't get my
    answer.
  2. I emphasize that I'm not talking about keyboard shortcuts
    and I'm actually talking about defining a new keyboard key type
  3. And sorry for my bad english xD

Best Answer

From what I understand, to put it in simple words, you want to create a custom key (be it a combination of keys).

If that's the case and you are using Ubuntu Precise go to SYSTEM SETTINGS then KEYBOARD and then hit the SHORTCUTS tab.

If the feature you want isn't in the list just go to the bottom on the list on the left hand side and click CUSTOM SHORTCUTS.

You can then click the little + symbol at the bottom of the screen to add a new custom shortcut. Then type in the Shortcut name followed by the command to invoke it (really depends and what you want to do). You'll have to research the command you need to start or invoke the application or task you want to do. After typing in the command hit OK.

You will now see the shortcut created in the list. Towards the right it will have the word DISABLED. click on the word DISABLED and then click the key or combination of keys you want to use to activate this shortcut (the command) you created.

for example: if I want to create a key shortcut to open www.google.com in the browser and want to call the shortcut CHROME. I then want it to run when I hit CTRL + W, I would do the following in the SYSTEM SETTINGS > KEYBOARD > SHORTCUTS section

NAME: CHROME

COMMAND: chromium-browser http://www.google.com

  • I would then hit the OK button

  • Then, I would click on the word DISABLED that appears the right of the shortcut named CHROME

  • After clicking on the word DISABLED I would hit CTRL and W key together.

You can use the SUPER key or any key on your keyboard. I've tested this on my system with a Logitech (being a Logitech Fan lol).

Related Question