Bug 288484

Summary: Custom shortcut for keyboard layout switching causes problems
Product: [Applications] systemsettings Reporter: Gokdeniz Karadag <gokdenizk>
Component: kcm_keyboard_layoutAssignee: Andriy Rysin <arysin>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: regular status of keyboard layouts
keyboard layouts confused after using "custom keyboard layout switching" shortcut

Description Gokdeniz Karadag 2011-12-08 14:55:41 UTC
Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

Setting a custom shortcut for keyboard layout switching causes problems.
Pressing the custom shortcut makes the last "main layout" to be carried into "spare layouts" part (below the seperator) and an empty layout, indicated by "-- -" replaces it. The details are below in "Steps to reproduce" part.

Be aware that the bug is not dependant on number of layouts or "spare layouts". The bug happens even if there is only 2 layouts configured and spare layouts option is disabled (which is a very common scenario)

There are similar reports:
https://bbs.archlinux.org/viewtopic.php?id=129848
http://permalink.gmane.org/gmane.linux.suse.kde/14557

one user suspected of the following commit to introduce the bug:
http://www.commit-digest.org/issues/2011-10-30/moreinfo/d55e6f6da0e6b0114adf42b506ce39c79ffe2ed8/

Reproducible: Always

Steps to Reproduce:
 * Set a custom key for keyboard layout switching
 * Add a number of keyboard layouts (us, tr, af, al)
 * Set the main layout count to 3, layout context menu shows
    us - English (US)
    tr - Turkish
    af - Afghani
    ======= seperator
    al - Albanian
 * At this step clicking on the layout indicator, or using a preset shortcut (Alt+Shift) cycles correctly through main keyboard layouts
 * Press the custom layout switching key
 * The layout does not change, the layout context menu shows:
   us - English (US)
   tr - Turkish 
   -- -
   =========== seperator
   af - Afghani
   al - Albanian
 * From this point, clicking on the layout indicator, or using a preset shortcut cycles only through US and TR
 * clicking on "-- -" empty item resets the layout to the first layout, which is US
 * Choosing a "spare layout" through the context menu fixes the "counts" of the main and spare layouts, and gets rid of the empty layout "--" but the spare layout that you clicked on now considered a "main" layout. With the following context menu:
    us - English (US)
    tr - Turkish
    al - Albanian
    ======= seperator
    af - Afghani

Actual Results:  
custom keyboard layout switching shortcut did not change keyboard layout, introduced an empty layout and pushed one layout to "spare" part.

Expected Results:  
Pressing custom keyboard layout switching shortcut should cycle main layouts, without modifying spare list and introducing empty layouts.

The custom keyboard layout switching shortcut was working with KDE SC 4.6.5
Comment 1 Andriy Rysin 2011-12-08 15:01:24 UTC

*** This bug has been marked as a duplicate of bug 264886 ***
Comment 2 Gokdeniz Karadag 2011-12-08 15:46:49 UTC
Hi,

This bug is not related to bug 264886 ("redundant tray icon" bug). 
I'll add some screenshots to show the keyboard layout bug.
Comment 3 Gokdeniz Karadag 2011-12-08 15:47:18 UTC
Created attachment 66505 [details]
regular status of keyboard layouts
Comment 4 Gokdeniz Karadag 2011-12-08 15:47:54 UTC
Created attachment 66506 [details]
keyboard layouts confused after using "custom keyboard layout switching" shortcut
Comment 5 Andriy Rysin 2011-12-08 17:05:13 UTC

*** This bug has been marked as a duplicate of bug 286302 ***