Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zero-Key Mapping not working in X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
JamesBong
n00b
n00b


Joined: 08 Feb 2006
Posts: 9
Location: Freiburg, Germany

PostPosted: Sun Nov 12, 2006 2:45 pm    Post subject: Zero-Key Mapping not working in X Reply with quote

Hardware: PowerBook5,6 1.6 GHz

Problem: when pressing the zero-key I don't get the zero symbols. The euqal symbol works with Shift and so does the commbination of Shift+Mod produce the } symbol. The key is working as expected in console, but not in any X-application.
I am able to get a 0 in xterminals when I press ctrl in addition to pressing the zeo-key, but unfortunately this doesn't work in any other apps.

This is my configuration:

/etc/X11/xorg.conf: (xorg-x11, Version 7.1, xkbdata 1.0.1)
Code:

Section "InputDevice"
        Identifier      "Keyboard0"
        Driver          "keyboard"
        Option          "XkbModel"      "macintosh"
        Option  "XKbLayout"     "mac_de"
EndSection

This is what xev tells me about the key, when pressing it:
Code:

FocusIn event, serial 29, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 29, synthetic NO, window 0x1a00001,
    mode NotifyGrab, detail NotifyAncestor


Following the related to zero output of dumpkeys:
Code:

keycode  11 = zero             equal            braceright
    alt keycode  11 = Meta_zero
    shift   alt keycode  11 = Meta_equal
    altgr   alt keycode  11 = Meta_braceright


I am also using a local xmodmapfile but since the problem stays when starting X without xmodmap, I don't think the cause of the problem might be in here:
Code:

keycode 0x73 = Mode_switch
keycode 0x74 = Mode_switch
keycode 0x10 =  7 slash braceleft
keycode 0x11 =  8 parenleft bracketleft
keycode 0x12 =  9 parenright bracketright
keycode 0x13 =  0 equal braceright
keycode 0x14 =  ssharp question backslash
keycode 0x16 =  BackSpace KP_Delete
keycode 0x18 =  q Q at
keycode 0x1a =  e E currency
keycode 0x36 =  c C cent
keycode 0x23 =  plus asterisk asciitilde
keycode 0x31 = less greater bar
!keycode 0x31 = asciicircum degree
keycode 0x5e = asciicircum degree
keycode 0x16 = BackSpace BackSpace Delete
keycode 0x1f = i I Insert
keycode 0x62    = Up     Up    Prior
keycode 0x68    = Down   Down  Next
keycode 0x64    = Left   Left  Find
keycode 0x66    = Right  Right Select
Back to top
View user's profile Send private message
gnomeza
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 97

PostPosted: Thu Nov 16, 2006 1:34 am    Post subject: Reply with quote

You didn't post the proper output from xev. You need to post the KeyPress and KeyRelease events.
e.g.:
Code:

KeyPress event, serial 25, synthetic NO, window 0x3200001,
    root 0x4d, subw 0x3200002, time 3999343340, (28,53), root:(1042,348),
    state 0x0, keycode 19 (keysym 0x30, 0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 25, synthetic NO, window 0x3200001,
    root 0x4d, subw 0x3200002, time 3999343435, (28,53), root:(1042,348),
    state 0x0, keycode 19 (keysym 0x30, 0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False


That'll tell us what X is actually seeing.

I highly recommend doing away with the old xmodmap. Write a custom XKB map.
Back to top
View user's profile Send private message
JamesBong
n00b
n00b


Joined: 08 Feb 2006
Posts: 9
Location: Freiburg, Germany

PostPosted: Thu Nov 16, 2006 7:14 pm    Post subject: Reply with quote

thanks for the reply:

this is what I get from xev:
Code:

FocusOut event, serial 29, synthetic NO, window 0x1c00001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 29, synthetic NO, window 0x1c00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 29, synthetic NO, window 0x1c00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   


do you have a link to a good documentation on how to write your own xkb-map?
Back to top
View user's profile Send private message
gnomeza
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 97

PostPosted: Fri Nov 17, 2006 12:58 pm    Post subject: Reply with quote

Hmm. So no keypress events generated by the zero-key at all? That's --- strange. Do other keys generate KeyPress and KeyRelease events in xev?

This will give you a better understanding of the xev output:
http://www.tronche.com/gui/x/xlib/events/types.html

XKB guides:
http://www.charvolant.org/~doug/xkb/
and http://www.xfree86.org/current/XKB-Config.html
Back to top
View user's profile Send private message
JamesBong
n00b
n00b


Joined: 08 Feb 2006
Posts: 9
Location: Freiburg, Germany

PostPosted: Sun Nov 19, 2006 2:17 pm    Post subject: Reply with quote

Quote:

Hmm. So no keypress events generated by the zero-key at all? That's --- strange. Do other keys generate KeyPress and KeyRelease events in xev?

All the other keys do. The "zeor" is the only symbold not generated. The other symbols work with a little workaround. Shift and zero produces the = sign, and mod1+shift makes the } symbol.
I'll try to check the guides and come back to you. So far thank you for your efford
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum