[xmonad] Issue 554 in xmonad: mkKeymap (hence additionalKeysP) doesn't handle NLS characters

codesite-noreply at google.com codesite-noreply at google.com
Sat Aug 17 23:51:33 CEST 2013


Status: Accepted
Owner: allber... at gmail.com
Labels: Component-Contrib Type-Defect Usability

New issue 554 by allber... at gmail.com: mkKeymap (hence additionalKeysP)  
doesn't handle NLS characters
http://code.google.com/p/xmonad/issues/detail?id=554

What steps will reproduce the problem?
1. Try to use a national language character such as ù in a keybinding with  
`additionalKeysP`
2. Observe that the keybinding doesn't work

What is the expected output? What do you see instead?

If you dump the resulting key bindings from the XConfig, the key is not  
present at all, even in a mangled form

The following code is part of XMonad.Util.EZConfig:

     -- | Parse an unmodified basic key, like @\"x\"@, @\"<F1>\"@, etc.
     parseKey :: ReadP KeySym
     parseKey = parseRegular +++ parseSpecial

     -- | Parse a regular key name (represented by itself).
     parseRegular :: ReadP KeySym
     parseRegular = choice [ char s >> return k
                           | (s,k) <- zip ['!'..'~']  
[xK_exclam..xK_asciitilde]
                           ]

     -- | Parse a special key name (one enclosed in angle brackets).
     parseSpecial :: ReadP KeySym
     parseSpecial = do _   <- char '<'
                       key <- choice [ string name >> return k
                                     | (name,k) <- keyNames
                                     ]
                       _   <- char '>'
                       return key

Note that the only options here are literal characters in the range '!'  
through '~', or specific named sequences. Neither NLS characters outside  
the /[!-~]/ range nor hex keysyms of the form supported by many Xlib-based  
mechanisms and widely used for Unicode symbols are supported.

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings


More information about the xmonad mailing list