0

Dell Vostro laptop has three special keys. There is Dell software for windows - 'quickset' that allows to assign an action for those keys. But for Linux there seems to be no way to identify and assign the keys. However, one, 'settings' key works - it opens the 'start' menu in xfce (maybe kde5 too).

Can I somehow identify those special keys and assign them, for instance, the right key in that row to turn off/on the monitor?

upper right corner

  • 1
    You can run xev from a terminal to see low-level(-ish) data on keypresses. Do those keys generate any output there? – Ulrich Schwarz Apr 20 at 14:06
  • Install xev and try again. – Emmanuel Rosa Apr 21 at 3:06
  • 1
    @UlrichSchwarz those two special keys generate nothing for xev – CodeGust Apr 22 at 10:06
1

In order to map rare or custom key bindings you will need to manually edit xmodmap and ensure that it boots every time X starts.

If xev is not working, you can also run showkey --keycodes When I ran showkey --keycodes it returned an error

Couldn't get a file descriptor referring to the console

So I had to run showkey --ascii and use the first column number, the decimal number in this case 97 a 97 0141 0x61 and convert it to a hex number which returned a confirmed and correct value of 61 for key a, which is what xev returned as well as seen below.

Now start an X session, just log into your xfce desktop environment and run xev. A small window will pop up and the terminal will start outputting data for every key interaction that is received from the keyboard.

Here is the output that xev generated when I pressed the a key and when I released the key.

KeyPress event, serial 48, synthetic NO, window 0x2400001,
    root 0x13e, subw 0x0, time 5887747, (622,717), root:(633,745),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XmbLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

KeyRelease event, serial 48, synthetic NO, window 0x2400001,
    root 0x13e, subw 0x0, time 5887843, (622,717), root:(633,745),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

Now, when pressing a key that is not mapped it will return a NoSymbol value following the keycode number.

Everytime you identify a NoSymbol key, note the keycode number.

KeyRelease event, serial 28, synthetic NO, window 0x3400001,
    root 0x38, subw 0x0, time 636666629, (158,102), root:(832,903),
    state 0x10, keycode 164 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:  ""

Once you identified and noted all the keycode that return a NoSymbol,

Enter

$ xmodmap -pke > xmodmap.conf

Which will write the current keyboard map to xmodmap.conf.

Now you will have to edit xmodmap.conf and assign a XF86 keyboard symbol to the keycode.

Any free XF86 keyboard symbol will do as long as it's not in use.

keycode 164 = XF86Music

save the edited xmodmap.conf file

Add it to autostart every time X runs.

echo 'xmodmap xmodmap.conf' >> ~/.xinitrc

and you can enter xmodmap xmodmap.conf to bypass the need to reboot, and just reload xmodmap right away and enjoy your newly mapped keyboard keys.

  • 1
    thank you for the try. However, the problem here is that those two special non-keyboard keys cannot be read. There are no codes for them (showkey, xev), unlike for the rest of the keys. Let's put it this way: we need a "driver" for those keys. notebookcheck.net/fileadmin/_migrated/pics/IMG_6994_1600.jpg -- right, upper corner, two right keys. still, somehow in xfce the left key out of those 3 opens the start menu, prints nothing for showkey and prints somedata for xev – CodeGust Apr 26 at 11:55
  • Which model of Vostro? Please look on the underside for the Service Tag, click edit under your original question, and add it to the original question so we can dig deeper. – K7AAY May 2 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.