Bug 247966

Summary: Keyboard layout resets when faking keyboard input
Product: kxkb Reporter: wonderz
Component: generalAssignee: Andriy Rysin <arysin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.5.1

Description wonderz 2010-08-15 17:34:17 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

Any keyboard simulator (xdotool, xte, KDE virtual keyboard) resets the keyboard layout (language) to the default in all other windows.

Reproducible: Always

Steps to Reproduce:
1) Open Kate, switch keyboard layout from default (en to ru, for example)
2) Open konsole, execute: xte 'key A' (xautomation must be installed)
3) Return to the Kate window.


Actual Results:  
Layout in Kate is switched to default again.

Expected Results:  
Layout in Kate must be unchanged.
Comment 1 Andriy Rysin 2010-08-16 04:36:43 UTC
Which layout switching mode is used Global or Application/Window ?
Comment 2 wonderz 2010-08-16 07:45:29 UTC
The bug can be reproduced in both "application" and "window" modes.
Comment 3 wonderz 2010-08-17 15:10:58 UTC
At least please provide a workaround. This bug is killing me, I can't use IM applications normally. Is there a way to simulate keyboard input without resetting the keyboard layout?
Comment 4 Andriy Rysin 2010-08-18 03:11:47 UTC
This is quite ugly - I've tried kvkbd and when you press a key it resets the whole keyboard layout map, on this event keyboard module just resets all active layouts to default.

I'll take a look if I can ignore this event in case layouts actually didn't change.
Comment 5 Andriy Rysin 2010-08-18 03:22:20 UTC
SVN commit 1164935 by rysin:

Don't reset keyboard layout map if they haven't actually changed
BUG: 247966
FIXED-IN: 4.5.1


 M  +2 -2      keyboard_daemon.cpp  
 M  +7 -3      layout_memory.cpp  
 M  +2 -1      layout_memory.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1164935
Comment 6 Andriy Rysin 2010-08-18 03:22:59 UTC
SVN commit 1164936 by rysin:

Don't reset keyboard layout map if they haven't actually changed
BUG: 247966

 M  +2 -2      keyboard_daemon.cpp  
 M  +7 -3      layout_memory.cpp  
 M  +2 -1      layout_memory.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1164936