On Mon, May 06, 2013 at 07:28:41PM +0200, Alexander Maret-Huskinson wrote: > Am Montag, 6. Mai 2013, 09:53:20 schrieb Ping Cheng: > > On Mon, May 6, 2013 at 9:22 AM, Alexander Maret-Huskinson <a...@maret.de> > wrote: > > Am Montag, 6. Mai 2013, 10:07:46 schrieb Peter Hutterer: > > > On Sat, May 04, 2013 at 09:32:28PM +0200, Alexander Maret-Huskinson wrote: > > > Hi, > > > > > > when using xsetwacom 0.21.0 to set express key shortcuts it is possible to > > > "crash" the wacom driver by setting special keys. The driver will no > > > longer > > > respond to any express keys and it is not possible to reset the shortcuts > > > to something else. One has to disconnect and reconnect the tablet to be > > > able to set or use shortcuts again. > > > > > > xsetwacom .... set Button 1 "key shift §" > > > > > > ... or ... > > > > > > xsetwacom ... set Button 1 "key shift ß" > > > > > > ... both will crash the driver as explained above. > > > > > > This is a problem because e.g. on a german keyboard, the "ß" is a normal > > > key which does not require any modifiers. > > > > > > I tried to work around this problem by converting these special keys to > > > X11 > > > key symbol names, but it seems, xsetwacom only accepts a very limited set > > > of X11 key symbols. > > > > > > It is possible to use "key shift exclam", however "key shift grave" does > > > not work. Instead one has to use the deprecated form "key shift > > > quoteleft". Also many other key symbols like e.g. "paragraph" don't seem > > > to work. > > > > > > Where do I find a list of X11 key symbols which are supported by > > > xsetwacom? > > > > http://sourceforge.net/p/linuxwacom/xf86-input-wacom/ci/master/tree/tools/xs > > > etwacom.c#548 it's an obviously incomplete list but the basic approach to > > > this is to call XKeysymToKeycode(XStringToKeysym(<input string>)). > > > > The XStringToKeysym() is the key point of failure here, its translation > > rules are limited. ß isn't recognised, but the symbolic name for it is > > xsetwacom set ... "key ssharp" > > > > and those names you can get from /usr/include/X11/keysymdef.h > > > > having said all that, I can't reproduce the 'crash' - xsetwacom bails out > > for § but I can still set some other config afterwards. > > > > Cheers, > > Peter > > > > > Thanks for the clarification about the symbols. It seems that on Ubuntu > > > 12.04 > > > not all symbols can be resolved even though they are listed in > > > keysymdef.h. > > > > > > About the crash: > > > > > > I experimented some more and it seems that it does not matter which > > > symbols > > > you set. If you change an express button shortcut often enough, sooner or > > > later the driver will no longer accept any shortcuts nor will it send any > > > key > > > events when pressing an express button - you have to disconnect and > > > reconnect > > > the tablet. This is also on Ubuntu 12.04 with xsetwacom 0.21.0. > > > > > > Funnily it also seems to work if you set invalid shortcuts like "key shift > > > ß", which are rejected by xsetwacom. Unfortunately I could not find a way > > > to reproduce it reliably. Also the number of attempts you need varies a > > > lot. Sometimes I can crash the driver by settings two or three shortcuts > > > in > > > a row (on the same button!), sometimes I need 10 or 20 attempts. It seems > > > to crash more often when using X11 key symbol names, than when using a-z > > > or > > > 0-9. > > > > > > If I find the time, I will give it a try on OpenSUSE 12.3 as well and see > > > if > > > I can get it to crash there, too.> > > > > > > Thank you for your testing, Alex! If possible, testing on latest Fedora may > > draw most experts' attention ;-). > > > > > > Ping > > > Sorry, I do not have Fedora installed. But I tested on OpenSUSE 12.3 and > there, everyhing is fine, I didn't get it to crash. > > It looks like Ubuntu's symbol conversion method is pretty messed up. For > instance you can not use "key grave", but you have to use "key quoteleft" > which is deprecated according to keysymdef.h. Also there are many other > symbols which do not work and some have a different symbol name. On Ubuntu I > have to use "key dead_circumflex" to get a "^", on SUSE it's "key > asciicircum". > > Sorry for the noise, most likely it's an Ubuntu problem only. > > It seems, on Ubuntu, there is no reliable way to convert keys to a symbol > which will be accepted by xsetwacom. How did you solve this problem with the > Gnome configuration module? I would really like to find a solution so our KDE > KCM can set all keys without manual intervention.
have a look at https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/wacom/gsd-wacom-manager.c g-s-d doesn't use the driver property (it only resets it to default), it grabs the button instead. filter_button_events() is called for those events and in turns calls generate_key(). the main translation work here is in gdk_keymap_get_entries_for_keyval(). Cheers, Peter ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel