On Mon, May 06, 2013 at 06:22:57PM +0200, Alexander Maret-Huskinson 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.

before I forget: look at xinput list-props to check what the button mappings
end up at on the device, and set debugging in the driver to the max level to
see where the event disappears to.

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

Reply via email to