I'm key mapping a custom keyboard in KED

on:

    lsb_release -rd
        Description:    openSUSE 12.3 (x86_64)
        Release:        12.3

    kde4-config -version
        Qt: 4.8.4
        KDE Development Platform: 4.10.1 "release 545"
        kde4-config: 1.0


I want to map a multi-key chord ("fn"+"F12") in KDE to "eject" my DVD drive.

The keys are active

@ xev

    press "F12"
        KeyRelease event, serial 40, synthetic NO, window 0x3a00001,
            root 0x264, subw 0x0, time 2099398, (426,527), root:(430,591),
            state 0x10, keycode 96 (keysym 0xffc9, F12), same_screen YES,
            XLookupString gives 0 bytes:
            XFilterEvent returns: False


    press "fn"
        KeyPress event, serial 40, synthetic NO, window 0x3a00001,
            root 0x264, subw 0x0, time 2103556, (426,527), root:(430,591),
            state 0x10, keycode 135 (keysym 0xffe8, Meta_R), same_screen YES,
            XLookupString gives 0 bytes:
            XmbLookupString gives 0 bytes:
            XFilterEvent returns: False

The keysym for eject is defined

    grep -i eject /usr/include/X11/XF86keysym.h
        #define XF86XK_Eject            0x1008FF2C   /* Eject device (e.g. DVD) 
   */

1st mod'ing a single-key solution,

    edit ~/.Xmodmap
    -    keycode  96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12
    +    keycode  96 = XF86XK_Eject F12 F12 F12 F12 F12 XF86Switch_VT_12

then

    xmodmap ~/.Xmodmap

returns

    xmodmap ~/.Xmodmap
        xmodmap:  /home/user/.Xmodmap:89:  bad keysym name 'XF86XK_Eject' in 
keysym list
        xmodmap:  1 error encountered, aborting.

otoh, mod'ing again

    edit ~/.Xmodmap
    -    keycode  96 = XF86XK_Eject F12 F12 F12 F12 F12 XF86Switch_VT_12
    +    keycode  96 = XF86Eject F12 F12 F12 F12 F12 XF86Switch_VT_12

now

    xmodmap ~/.Xmodmap

succeeds

@ xev

    KeyPress event, serial 40, synthetic NO, window 0x3600001,
        root 0x264, subw 0x0, time 2922751, (596,464), root:(600,528),
        state 0x10, keycode 96 (keysym 0x1008ff2c, XF86Eject), same_screen YES,
        XLookupString gives 0 bytes:
        XmbLookupString gives 0 bytes:
        XFilterEvent returns: False

(1) Should not .Xmodmap not use the "XF86XK_Eject" keysym defined in

    /usr/include/X11/XF86keysym.h

instead of requiring

    "XF86Eject"

or does the keycode definition NOT use the keysym ?

(2) In any case, what next steps do I need to take to 1st get a single-, then 
two-, key-press to actually eject the drive drawer?  So far, I've not managed 
with any keystroke to actually get the drive to eject.
___________________________________________________
This message is from the kde-linux mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde-linux.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

Reply via email to