Bug 673450 - unable disable capslock after swapping control-l and capslock
Summary: unable disable capslock after swapping control-l and capslock
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xkb-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hutterer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-28 09:28 UTC by Nikola Pajkovsky
Modified: 2018-04-11 17:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-31 13:16:56 UTC
Type: ---


Attachments (Terms of Use)
Xorg.0.log (40.34 KB, text/plain)
2011-01-28 13:45 UTC, Nikola Pajkovsky
no flags Details
Xorg.0.log.old (41.68 KB, text/plain)
2011-01-28 13:46 UTC, Nikola Pajkovsky
no flags Details
/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf (371 bytes, text/plain)
2011-01-28 13:48 UTC, Nikola Pajkovsky
no flags Details
xkbcomp -xkb $DISPLAY - > ~/xkbcomp (54.53 KB, text/plain)
2011-01-28 13:51 UTC, Nikola Pajkovsky
no flags Details

Description Nikola Pajkovsky 2011-01-28 09:28:07 UTC
Version-Release number of selected component (if applicable):
xorg-x11-xkb-utils-7.5-2.fc15.x86_64
xorg-x11-server-Xorg-1.9.99.1-3.20101201.fc15.x86_64

How reproducible:
$ cat ./swap-ctrl-caps
#!/bin/bash

setxkbmap -option ctrl:swapcaps
setxkbmap -option ctrl:nocaps

Actual results:
left control still working as capslock

Expected results:
left control works as, ehm, left control

Comment 1 Matěj Cepl 2011-01-28 13:25:20 UTC
Could we get logs as per https://fedoraproject.org/wiki/Xorg/Input_Triage_Algorithm, please, attached as uncompressed separate attachments to this report?

THank you

Comment 2 Nikola Pajkovsky 2011-01-28 13:45:52 UTC
Created attachment 475803 [details]
Xorg.0.log

Comment 3 Nikola Pajkovsky 2011-01-28 13:46:47 UTC
Created attachment 475804 [details]
Xorg.0.log.old

sigsegv (didn't notice at all)

Comment 4 Nikola Pajkovsky 2011-01-28 13:48:28 UTC
Created attachment 475805 [details]
/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf

Option          "ctrl:swapcaps"
Option          "ctrl:nocaps"

this doesn't work at all

Comment 5 Nikola Pajkovsky 2011-01-28 13:51:06 UTC
Created attachment 475807 [details]
xkbcomp -xkb $DISPLAY - > ~/xkbcomp

already swapped control, capslock and disabled capslock (done in gnome layout config)

Comment 6 Matěj Cepl 2011-01-31 12:39:41 UTC
(In reply to comment #0)
> setxkbmap -option ctrl:swapcaps
> setxkbmap -option ctrl:nocaps
> 
> Actual results:
> left control still working as capslock

I am sorry I have missed this when reading this first time. Your calling setxkbmap twice just doesn't do what you think it should. Let's look at the manpage of setxkbmap(1):

-option name
        Specifies  the  name  of  an option to determine the components
        which make up the keyboard description;  multiple  options  may
        be  specified,  one  per -option flag. Note that setxkbmap adds
        options specified in the command line to the options that  were
        set before (as saved in root window properties). If you want to
        replace all previously specified options, use the -option  flag
        with an empty argument first.

You are trying to do something which is specifically explained to work. I am not sure, what's your desired end point (could you elaborate on that a little bit, please? I am afraid I don't understand your Expected Results much? What should CapsLock do?), but I believe that left control still working as capslock is exactly what should happens if setxkbmap works according to the specification. If you think that nocaps is just opposite of swapcaps, then you are I am afraid mistaken. If you want to get rid of the settings generated by swapcaps (or anything else), then you have to run 

setxkbmap -options

(without any value to -options switch) and then reassemble desired outcome again.

The second point:

> #	Option		"XkbOptions"	"terminate:ctrl_alt_bksp,"
> 	Option 		"ctrl:swapcaps"
> 	Option		"ctrl:nocaps"

Aside from the same what applies to previous, this is just not syntax of xorg.conf. Take a look at kbd(4):


Option "XkbOptions" "options"
       specifies the XKB keyboard option components.  These can be used
       to enhance the keyboard behaviour.  Default: not set.

and an example shows:

Section "InputDevice"
    Identifier   "Generic Keyboard"
    Driver       "kbd"
    Option       "CoreKeyboard"
    Option       "XkbRules"      "xorg"
    Option       "XkbModel"      "pc105"
    Option       "XkbLayout"     "us,sk"
    Option       "XkbVariant"    ",qwerty"
    Option       "XkbOptions"    "grp:menu_toggle,grp_led:scroll"
EndSection

For further information about configuration of the keyboard look at http://www.xfree86.org/current/XKB-Config.html (specifically for us is relevant http://www.xfree86.org/current/XKB-Config2.html).

As of that crash in the comment 3, I think it looks awfully like bug 666900, except this is on xorg-x11-drv-intel. Made a comment to that bug.

What else remains here to be resolved?

Comment 7 Nikola Pajkovsky 2011-01-31 13:16:56 UTC
(In reply to comment #6)
> (In reply to comment #0)
> > setxkbmap -option ctrl:swapcaps
> > setxkbmap -option ctrl:nocaps
> > 
> > Actual results:
> > left control still working as capslock
> 
> I am sorry I have missed this when reading this first time. Your calling
> setxkbmap twice just doesn't do what you think it should. Let's look at the
> manpage of setxkbmap(1):
> 
> -option name
>         Specifies  the  name  of  an option to determine the components
>         which make up the keyboard description;  multiple  options  may
>         be  specified,  one  per -option flag. Note that setxkbmap adds
>         options specified in the command line to the options that  were
>         set before (as saved in root window properties). If you want to
>         replace all previously specified options, use the -option  flag
>         with an empty argument first.
> 
> You are trying to do something which is specifically explained to work. I am
> not sure, what's your desired end point (could you elaborate on that a little
> bit, please? 

simply use capslock as control key

> I am afraid I don't understand your Expected Results much? What
> should CapsLock do?), but I believe that left control still working as capslock
> is exactly what should happens if setxkbmap works according to the
> specification. If you think that nocaps is just opposite of swapcaps, then you
> are I am afraid mistaken. If you want to get rid of the settings generated by
> swapcaps (or anything else), then you have to run 
> 
> setxkbmap -options
> 
> (without any value to -options switch) and then reassemble desired outcome
> again.
> 
> The second point:
> 
> > #	Option		"XkbOptions"	"terminate:ctrl_alt_bksp,"
> > 	Option 		"ctrl:swapcaps"
> > 	Option		"ctrl:nocaps"
> 
> Aside from the same what applies to previous, this is just not syntax of
> xorg.conf. Take a look at kbd(4):
> 

Damn, should be Option	"XkbOptions"	"ctrl:nocaps"

> Option "XkbOptions" "options"
>        specifies the XKB keyboard option components.  These can be used
>        to enhance the keyboard behaviour.  Default: not set.
> 
> and an example shows:
> 
> Section "InputDevice"
>     Identifier   "Generic Keyboard"
>     Driver       "kbd"
>     Option       "CoreKeyboard"
>     Option       "XkbRules"      "xorg"
>     Option       "XkbModel"      "pc105"
>     Option       "XkbLayout"     "us,sk"
>     Option       "XkbVariant"    ",qwerty"
>     Option       "XkbOptions"    "grp:menu_toggle,grp_led:scroll"
> EndSection
> 
> For further information about configuration of the keyboard look at
> http://www.xfree86.org/current/XKB-Config.html (specifically for us is relevant
> http://www.xfree86.org/current/XKB-Config2.html).
> 
> As of that crash in the comment 3, I think it looks awfully like bug 666900,
> except this is on xorg-x11-drv-intel. Made a comment to that bug.
> 
> What else remains here to be resolved?

I think all is resolved. I should only setxkbmap -option ctrl:nocaps to kill capslock and made it as control. Thank you for hints about my wrong config in xorg.conf


Note You need to log in before you can comment on or make changes to this bug.