|SWTBot handling of "obscure" keyboard layouts [message #792737]
||Tue, 07 February 2012 10:50
| Geoff Bache
Registered: October 2010
I've just become the latest person to notice that it isn't very easy to persuade SWTBot to type text if you aren't blessed with an American keyboard
Currently, the behaviour is simply to throw an exception and require the user to set the KEYBOARD_LAYOUT preference explicitly to EN_US or implement a keyboard layout file themselves (see http://wiki.eclipse.org/SWTBot/Keyboard_Layouts). The situation today is that we only have files for American, French, German and Mac keyboards, a very small percentage of the keyboard layouts in the world.
The fact is, for most testing purposes being able to type ASCII text is usually all you need, so the keyboard layout isn't important, and for many layouts there is a more "widely used" keyboard that is very similar for most normal characters.
Rather than waiting for a great many .keyboard files to be submitted, would it not be better to create a fallback strategy? Just using en_US and printing a warning feels likely to be an improvement for most people than just refusing to do anything. Better still would be to have more fallback data: my Swedish keyboard is very similar to a German layout and using DE_DE would be correct in almost all cases. I would guess the same may well be true for e.g. Danish, Norwegian, Dutch keyboards.
Powered by FUDForum
. Page generated in 0.02984 seconds