Results 1 to 4 of 4

Thread: keyboard special keys

  1. #1
    Join Date
    Mar 2006
    Beans
    54

    keyboard special keys

    Mapping of special keys found on many keyboards has been covered a few times. Here's my version which is intended to be a quick and easy solution. Enjoy those fancy keyboards!

    MY FILE: /usr/share/hotkey-setup/generic.hk
    # Special key bindings via /usr/share/hotkey-setup/generic.hk
    # Kernel key mappings for special keys can be set in this file
    #
    # STEP 1 - FIND SCANCODES
    # When an unmapped special keys is pressed a message is written
    # to /var/log/messages which indicates the "scancode".
    # To find the scancode for an unmapped special key press the key
    # then check /var/log/messages.
    #
    # STEP 2 - FIND UNUSED KEYCODES
    # use "$ sudo dumpkeys" to find unused keycodes
    # example of unused keycode: "keycode 120 ="
    #
    # STEP 3 - MAP SCANCODE TO KEYCODE
    # format = setkeycodes scancode keycode
    # example "setkeycodes e02a 120"
    # add each mapping entry to this file
    #
    # STEP 4 - RESTART HOTKEY-SETUP
    # after edit restarting the hotkey-setup service by:
    # $ sudo /etc/init.d/hotkey-setup restart
    #
    # STEP 5 - MAP KEYCODE TO ACTION
    # X11 mapping can be done with gnome-keybinding-properties
    # which is System > Preferences > Keyboard Shortcuts
    #
    #
    setkeycodes e02a 120 # gnome-keybinding-properties "Lock screen"
    setkeycodes e023 121 # gnome-keybinding-properties "Home folder"
    setkeycodes e015 122 # gnome-keybinding-properties "Launch help browser"
    setkeycodes e026 123 # gnome-keybinding-properties "Launch calculator"
    setkeycodes e06e 124 # gnome-keybinding-properties "Launch web browser"

  2. #2
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: keyboard special keys

    Hello,

    That would be very nice although before I ad a program where I could choose my keyboard make and model and it would recognize all my hotkeys. But I cannot remember the name of this package...
    So I was doing what you suggested but got an error on setting a keycode to an unused key, ie: setkeycodes e073 85
    and got this error: [Couldnt get a file descriptor referring to the console]

    Any idiea why?

    Yoram

  3. #3
    Join Date
    May 2007
    Location
    Pleasant Hill, California
    Beans
    315
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: keyboard special keys

    Quote Originally Posted by yoramdavid View Post
    Hello,

    That would be very nice although before I ad a program where I could choose my keyboard make and model and it would recognize all my hotkeys. But I cannot remember the name of this package...
    So I was doing what you suggested but got an error on setting a keycode to an unused key, ie: setkeycodes e073 85
    and got this error: [Couldnt get a file descriptor referring to the console]

    Any idiea why?

    Yoram
    A little late, but always try "sudo setkeycodes..." when something like this doesn't work. That error is what you would get without "sudo".

  4. #4
    Join Date
    Nov 2005
    Location
    Portugal, Baixo Alentejo
    Beans
    396
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: keyboard special keys

    Quote Originally Posted by linfidel View Post
    A little late, but always try "sudo setkeycodes..." when something like this doesn't work. That error is what you would get without "sudo".
    Thank you.

    Late but I will try since the problem is not yet solved.
    I found the program I used before (keyTouch) but it does not work like before. I think I have tried so many different things that the keys must be assigned by something else and conflict.
    I also used XbindKes....
    I have tried uninstalling them all and reinstalling only one, but the settings are still there messed up somewhere...

    Regards,

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •