Page 18 of 20 FirstFirst ... 81617181920 LastLast
Results 171 to 180 of 194

Thread: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

  1. #171
    Join Date
    Nov 2007
    Beans
    75

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    Just installed this keyboard today. Did anyone get the "favorites keys" working along with the "zoom"? I'm running Ubuntu 9.10 and everything works except for favorites and zoom, nor the F-Lock key.

    ~$ uname -a
    Linux Ubuntu-9-10 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 GNU/Linux
    Last edited by johnswb; January 27th, 2010 at 06:22 PM.

  2. #172
    Join Date
    Sep 2009
    Beans
    3

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    Quote Originally Posted by Samage View Post
    You may want to investigate the 'F Lock' key right at the end of the 'F' keys. Make sure it is on.
    Thanks! Sometimes the solution is so easy! I would had never expected a special key blocking the other function keys. Especially not after 18 pages of discussion about drivers.

  3. #173
    Join Date
    Sep 2009
    Beans
    3

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    Quote Originally Posted by johnswb View Post
    Just installed this keyboard today. Did anyone get the "favorites keys" working along with the "zoom"? I'm running Ubuntu 9.10 and everything works except for favorites and zoom, nor the F-Lock key.

    ~$ uname -a
    Linux Ubuntu-9-10 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 GNU/Linux
    To zoom the "visual effects" must be set to "Normal" in "System -> Preferences -> Appearance".

    Then you need to bound in System->Preferences -> Keyboard Shortcuts
    "Zoom In" to "XF86Forward" (which are the 2 keys under the space key) and
    "Zoom out" to "XF86Back".

    The zoom kind of joystick does not work for me.

  4. #174
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    Hello, since 2 weeks ago my keyboard started sending random key presses to my system. Usually it reduces or increases the volume rapidly. Once in console I managed to catch one of the signals and it was " [26~ ". Does anyone else have this problem? Changing USB port seems to correct it for some time, but usually PC is unusable cause I constantly have to fix sound volume.

    Thank you for your time.

  5. #175
    Join Date
    May 2010
    Beans
    1

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    I made a quick fix for this problem. It's based on kbd's showkey that DOES show scancodes. It looks into configuration table and stuffs required keysyms into X via Xtst package. Ugly, buggy and setuid (to read console under X you have to be setuid), but it works (at least for me) and requires only installation of the deb package. Lucid package is here:

    Code:
    sudo add-apt-repository ppa:rm-isaev/rawkeybind
    sudo apt-get update
    sudo apt-get install rawkeybind
    Then restart X.

    Source code: http://www.isaev.ru/rawkeybind/
    By default zoom up and down are bound to up arrow and down arrow but you can change it in /etc/rawkeybind.conf

  6. #176
    Join Date
    Aug 2007
    Location
    Olympia, Washington - US
    Beans
    33
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    I just purchased the Microsoft "Natural Ergonomic Keyboard 4000"

    I'm using 10.04 and pretty much everything works right out of the box. Gotta love not needing drivers!

    The only things that didn't are the variable zoom in the middle of the keyboard, the Back/Forward keys at the bottom of the keyboard, and the 5 special keys at the top.

    Not too bad considering every other specially labeled key was detected and 'just works'.

    I set the bottom Back/Forward keys as Jens Getreu said and they now work. I may reset them to actually do the firefox backward/forward functions they were designed for but for now I'm good.

    However those 5 special keys are not detected and there is no selection for the '4000' series in the keyboard selection utility...so I used the xev command from the terminal and here are the keycodes.

    Key 1
    KeyPress event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478036053, (31,45), root:(1213,101),
    state 0x10, keycode 192 (keysym 0x1008ff45, XF86Launch5), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478036213, (31,45), root:(1213,101),
    state 0x10, keycode 192 (keysym 0x1008ff45, XF86Launch5), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    Key 2
    KeyPress event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478031142, (31,45), root:(1213,101),
    state 0x10, keycode 193 (keysym 0x1008ff65, XF86MenuKB), same_screen YES,
    XKeysymToKeycode returns keycode: 147
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478031302, (31,45), root:(1213,101),
    state 0x10, keycode 193 (keysym 0x1008ff65, XF86MenuKB), same_screen YES,
    XKeysymToKeycode returns keycode: 147
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    Key 3
    KeyPress event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478631962, (46,53), root:(1228,109),
    state 0x10, keycode 194 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478632129, (46,53), root:(1228,109),
    state 0x10, keycode 194 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    Key 4
    KeyPress event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478632601, (46,53), root:(1228,109),
    state 0x10, keycode 195 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478632761, (46,53), root:(1228,109),
    state 0x10, keycode 195 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    Key 5
    KeyPress event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478633241, (46,53), root:(1228,109),
    state 0x10, keycode 196 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 36, synthetic NO, window 0x8a00001,
    root 0x1ad, subw 0x8a00002, time 1478633385, (46,53), root:(1228,109),
    state 0x10, keycode 196 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    So, the first two buttons already have an X-Server label associated with them and can therefore be slotted into a standard UI function...but the other 3 have no label yet. Not sure if there is a .conf file somewhere that has keycodes associated with a label...likely there is. Hope this helps someone.
    Mankind is my religion, of course I use GNU/Linux!

  7. #177
    Join Date
    May 2011
    Location
    Kharkov, Ukraine
    Beans
    27
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    Greetings to the brave knights of Microsoft ergo 4000! I would like to share my experience as well. I'm using Kubuntu Natty (11.04), and here's what I've got.
    In my case all the keys except (you guess it!) zoom key are working. Of course, some of them (like calculator or favorites) are not assigned to anything from the beginning, but this is simply fixable by System Setting -> Shortcuts and gestures.
    With zoom the situation is much more tough though. It seems that the system itself is not aware of it. I ran
    Code:
    xev
    and tested the keys - and I got responses for all of them, except zoom. I hope this will be fixed in subsequent kernels - this zoom key must be freaking cool for scrolling. Anyway, Ergo 4000 is the best keyboard in the world, and is the only thing I like from Microsoft

    UPDATE - this bug seem to cause the problem. According to it, keys with codes that are greater then 255 are ignored. From using
    Code:
     sudo showkey -k
    as someone suggested, it is visible that key codes for UP and DOWN for zoom are 418 and 419 - so no chance for them to work out of the box...
    Last edited by denisk; June 13th, 2011 at 03:51 PM.

  8. #178
    Join Date
    Mar 2010
    Location
    Chicago, IL
    Beans
    31
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    The usual labyrinthine search through the internet and a little trial and error has led to solve the Zoom Slider problem and I am now able to scroll using it. The solution is as follows:

    Summary:

    (i) Discover the keycodes generated by moving the Zoom Slider.
    (ii) Map the keycodes (greater than 255) to vacant values below 255.
    (iii) Bind the mapped keycodes to mouse scroll events.

    Details:

    Install evtest
    Code:
    sudo apt-get install evtest
    Discover the device node for the Ergonomic Keyboard
    Code:
    ls -l /dev/input/by-id
    The output will contain a symlink to the event number corresponding to the Ergonomic keyboard. For example when I run it:

    Code:
    total 0
    lrwxrwxrwx 1 root root  9 2011-09-29 15:01 usb-Logitech_USB_Receiver-event-kbd -> ../event5
    lrwxrwxrwx 1 root root  9 2011-09-29 15:01 usb-Logitech_USB_Receiver-event-mouse -> ../event6
    lrwxrwxrwx 1 root root  9 2011-09-29 15:01 usb-Logitech_USB_Receiver-mouse -> ../mouse1
    lrwxrwxrwx 1 root root 10 2011-09-29 15:01 usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-event-kbd -> ../event10
    So on my computer the Ergonomic keyboard resides at /dev/input/event10. The number X in /dev/input/eventX will be different for each setup.

    Now use evtest to find the keycodes for the Zoom Slider
    Code:
    sudo evtest /dev/input/event10
    This will generate a list of all the keycodes for the device and some of the common mappings. You can look at the output to find vacant keycodes. A small sample of the output:

    Code:
        Event code 192 (F22)
        Event code 193 (F23)
        Event code 194 (F24)
        Event code 206 (Close)
        Event code 207 (Play)
        Event code 208 (Fast Forward)
    I chose to use keycodes 193 and 194 for remapping since I don't have F23 and F24 (function keys) on my system.

    While evtest is running pressing any key on the keyboard will display information about said key. Pushing the Zoom Slider up displays
    Code:
    Event: time 1318494418.113457, type 4 (Misc), code 4 (ScanCode), value c022d
    Event: time 1318494418.113487, type 1 (Key), code 193 (F23), value 1
    Pushing the Zoom Slider down displays
    Code:
    Event: time 1318494466.969461, type 4 (Misc), code 4 (ScanCode), value c022e
    Event: time 1318494466.969478, type 1 (Key), code 194 (F24), value 1
    Press Ctrl+C to exit evtest. We are interested in the values that start with c, so Zoom Up has value c022d and Zoom Down has value c022e. Note that the keycodes are 418 and 419, that is greater than 255, which is why they cannot be accessed directly (practically this means the Zoom Slider is not detected by 'xev').


    The next step is to map these keycodes to the vacant ones (193 and 194) below 255. This involves the implementation of a udev rule. The first step is create a keymap file.

    I created an empty file named 'microsoft-ergonomic-keyboard' in the folder /lib/udev/keymaps and entered the following lines in to it
    Code:
    0xC022D 0xC1 # Zoom Up which we wish to be Scroll up
    0xC022E 0xC2 # Zoom Down which we wish to be Scroll down
    0xC1 and 0xC2 are the vacant codes 193 and 194 in hexadecimal. We need to implement a udev rule that implements the remapping laid out in the file we have just created. The udev rule needs to be applied to the Ergonomic Keyboard only so we must do a little research.

    Code:
    ls -l /sys/class/input/event10
    gives us
    Code:
    lrwxrwxrwx 1 root root 0 2011-10-13 03:42 /sys/class/input/event10 -> ../../devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.1/input/input10/event10
    We have used the /sys/class folder to find the location of the Ergonomic Keyboard (which we know to reside at /dev/input/event10) in the sysfs tree. This location will be used to get udev attributes we will need to construct the necessary udev rule.

    Code:
    udevadm info -a -p /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.1/input/input10/event10
    The output displays the udev attributes of the device and all its parents. Part of the output follows:

    Code:
    ...
      looking at device '/devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.1/input/input10/event10':
        KERNEL=="event10"
        SUBSYSTEM=="input"
        DRIVER==""
    ...
     looking at parent device '/devices/pci0000:00/0000:00:1d.3/usb5/5-1':
        KERNELS=="5-1"
        ...
        ATTRS{manufacturer}=="Microsoft"
    ...
    Our task is to use a combination of the attributes of the device itself and no more than one of its parents to uniquely identify the device (the Ergonomic keyboard) regardless of where (which USB port) and when it is connected. I chose to use SUBSYSTEM=="input" and ATTRS{manufacturer}=="Microsoft".

    Open /lib/udev/rules.d/95-keymap.rules for editing and add the udev rule
    Code:
    SUBSYSTEM=="input", ATTRS{manufacturer}=="Microsoft", RUN+="keymap $name microsoft-ergonomic-keyboard"
    in the external USB Keyboards section. The pertinent section of 95-keymap.rules after the addition has been made is
    Code:
    #
    # The following are external USB keyboards
    #
    
    LABEL="keyboard_usbcheck"
    
    ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
    ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless"
    # Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface
    ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c529", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-pro-cordless"
    
    ENV{ID_VENDOR}=="Lite-On_Technology_Corp*", ATTRS{name}=="Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint", RUN+="keymap $name lenovo-thinkpad-usb-keyboard-trackpoint"
    ENV{ID_VENDOR_ID}=="04b3", ENV{ID_MODEL_ID}=="301[89]", RUN+="keymap $name ibm-thinkpad-usb-keyboard-trackpoint"
    
    SUBSYSTEM=="input", ATTRS{manufacturer}=="Microsoft", RUN+="keymap $name microsoft-ergonomic-keyboard"
    
    GOTO="keyboard_end"
    The idea is to identify the correct device using the attributes and then implement the keymaps we placed in /lib/udev/keymaps/microsoft-ergonomic-keyboard. The new udev rule is usually implemented when the computer is restarted but we can force its immediate implementation using
    Code:
    sudo /lib/udev/keymap input/event10 /lib/udev/keymaps/microsoft-ergonomic-keyboard
    Running evtest now and pushing the Zoom Slider will now display the new keycodes: 193 and 194. This indicates that the remapping was successful.

    A discrepancy arises at this juncture. evtest and xev disagree as to the keycodes associated with the Zoom Slider. We will need the keycodes as detected by xev. So run 'xev' and find the keycodes for the Zoom Slider. They come out to be 201 for Zoom Up and 202 for Zoom Down.

    Now install xbindkeys and xdotool
    Code:
    sudo apt-get install xbindkeys xdotool
    xbindkeys allows one to associate bash commands with keysyms and keycodes. xdotool allows one to inject keyboard and mouse events in to the X Server.

    Create an empty ~/.xbindkeysrc file (or append to an already existing one) and add the following lines to it

    Code:
    "xdotool click 4"   # Scroll Up
    c:201
    
    "xdotool click 5"   # Scroll Down
    c:202
    The command 'xdotool click 4' implements a Scroll Up mouse event. The c:201 line tells xbindkeys to execute "xdotool click 4" when the key with keycode 201 is pressed. By virtue of the remapping we did with the udev rule pushing the Zoom Slider up generates this keycode.

    Simply execute
    Code:
    xbindkeys
    to implement these bindings. '/usr/bin/xbindkeys' will need to be placed in System >> Preferences >> Startup Applications to ensure that it is called on boot up.

    At this point the Zoom Slider should be working as a Scroll control. Enjoy.

  9. #179
    Join Date
    Mar 2010
    Location
    Chicago, IL
    Beans
    31
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    References:

    The various websites (incomplete list) I used to gather information for the solution presented above (with my profound thanks and appreciation) are:


    http://askubuntu.com/questions/33038...-and-other-but (udev rule for remapping)

    https://bugs.launchpad.net/ubuntu/+s...er/+bug/313514 (udev rule for remapping)

    https://wiki.archlinux.org/index.php...es_to_keycodes (udev rules)

    http://www.reactivated.net/writing_u...tml#sysfsmatch (udev rules)

    http://www.signal11.us/oss/udev/ (sysfs tutorial)

    http://joomla.unlikelysource.com/ind...howto-udevinfo (udevadm tutorial)

    http://www.semicomplete.com/projects...mouse_commands (xdotool commands)

  10. #180
    Join Date
    Dec 2004
    Location
    Germany
    Beans
    155
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Microsoft Natural Ergonomic Keyboard 4000 - enabling special keys

    abid_naqvi83, great research and guide on how to enable the slider. Unfortunately don't own this keyboard anymore so i can't test it, but i will update the first post and point to your posting.

Page 18 of 20 FirstFirst ... 81617181920 LastLast

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
  •