Bug 19795 - "Make CapsLock an additional ESC" doesn't work properly
Summary: "Make CapsLock an additional ESC" doesn't work properly
Status: RESOLVED WORKSFORME
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
: 22142 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-28 14:51 UTC by Wouter Bolsterlee
Modified: 2014-11-11 23:51 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xkbcomp output (50.05 KB, text/plain)
2009-02-02 23:56 UTC, Wouter Bolsterlee
Details
New xkbcomp :0 output (53.56 KB, text/plain)
2009-02-04 16:56 UTC, Wouter Bolsterlee
Details

Description Wouter Bolsterlee 2009-01-28 14:51:11 UTC
Thanks to the heroic svu my Gnome keyboard preferences now allow me to check a checkbox that states "Make CapsLock an additional ESC". Yay, finally I can drop the only remaining lines from my ~/.Xmodmap:

  remove Lock = Caps_Lock
  keycode 66 = Escape

So I ditched those two lines, and restarted X to see what would happen... too bad, the XKB configuration doesn't work as expected. Two problems:

- Caps Lock does work as an Escape (according to xev),
  but it still toggles the keyboard LED on and off.
  I should not. The Xmodmap solution does not have this
  problem.
- The real Escape is a VoidSymbol (according to xev),
  while it should just be an Escape, just as before.

I'm using xkb-data 1.5 from Debian packages.
Comment 1 Wouter Bolsterlee 2009-01-28 15:07:40 UTC
I'm not sure how useful this is, but this is in my xorg.conf:

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc104"
        Option          "XkbLayout"     "us"
EndSection
Comment 2 Sergey V. Udaltsov 2009-01-28 15:21:55 UTC
1. Ask CAPS to be a group indicator or smth. It is possible using grp_led:caps
2. Fixed in git.
Comment 3 Wouter Bolsterlee 2009-01-28 15:59:30 UTC
Thanks for the quick response, Sergey. Do your changes also fix the second problem I mentioned?
Comment 4 Sergey V. Udaltsov 2009-01-28 16:07:51 UTC
It fixes the second problem. The first one I did not fix - it is handled by another set of options.
Comment 5 Wouter Bolsterlee 2009-02-02 14:14:16 UTC
Hi Sergey,

> Ask CAPS to be a group indicator or smth. It is possible
> using grp_led:caps

I think enabled this setting (took me a while to find it), and it does appear in the /desktop/gnome/peripherals/keyboard/kbd/options GConf key at least as "grp_led<Tab>grp_led:caps", but hitting CapsLock (which now acts like an escape) still toggles the keyboard led... any clue?
Comment 6 Sergey V. Udaltsov 2009-02-02 14:34:12 UTC
Check xprop -root | grep XKB. Is that option visible there? Also, attach output of "xkbcomp :0 -xkb out.xkb"
Comment 7 Wouter Bolsterlee 2009-02-02 23:54:21 UTC
Yes, it's there (line break in second line of output added by me):

  $ xprop -root |grep XKB
  _XKB_RULES_NAMES_BACKUP(STRING) = "xorg", "pc104", "us", "", ""
  _XKB_RULES_NAMES(STRING) = "xorg", "pc105", "us", "",
    "compose:ralt,misc:typo,caps:escape,grp_led:caps"

Comment 8 Wouter Bolsterlee 2009-02-02 23:56:12 UTC
Created attachment 22510 [details]
xkbcomp output

Please find attached the output of

  $ xkbcomp :0 -xkb
Comment 9 Sergey V. Udaltsov 2009-02-04 16:18:46 UTC
Just loaded your xkb file. CAPS does not switch the indicator for me. May be, different versions of X server? I have 1.5.2 (Ubuntu 8.10). Also, would you try the evdev driver (and evdev rules).
Comment 10 Wouter Bolsterlee 2009-02-04 16:22:37 UTC
My versions:

$ dpkg -l xserver\* |grep ^ii
ii  xserver-xorg-dev                     2:1.4.2-10                       Xorg X server - development files
ii  xserver-xorg-input-evdev             1:2.0.8-1                        X.Org X server -- evdev input driver
ii  xserver-xorg-input-kbd               1:1.3.1-1                        X.Org X server -- keyboard input driver
ii  xserver-xorg-input-mouse             1:1.3.0-1                        X.Org X server -- mouse input driver
ii  xserver-xorg-video-vesa              1:2.0.0-1                        X.Org X server -- VESA display driver
ii  xserver-xorg-video-vga               1:4.1.0-8                        X.Org X server -- VGA display driver


Also, how do I try the evdev driver?
Comment 11 Sergey V. Udaltsov 2009-02-04 16:23:46 UTC
Change the driver line in xorg.conf, it might help
Comment 12 Wouter Bolsterlee 2009-02-04 16:42:38 UTC
Well, looks like I'm using evdev now for my keyboard. X insisted that I provided a device path for my keyboard, i.e. one of the /dev/input/event* devices or one of /dev/input/by-*/*, both of which are highly annoying since I might decide to change keyboard or plug it into another USB port when I feel like it.

Anyway, now that I'm using evdev, the led problem is still there, and additionaly my windows key gives a "NoSymbol" in xev, while it worked perfectly as a modifier before.
Comment 13 Wouter Bolsterlee 2009-02-04 16:46:25 UTC
Woooooh, looks like most of my non-alphabetic keys are totally fscked up now. Keypad enter acts as arrow down, AltGr as KP_Enter, PageUp aas KP_Divide, PageDown as Menu, and so on.

I'm using a Logitech Ultra-Flat Keyboard, btw.
Comment 14 Sergey V. Udaltsov 2009-02-04 16:50:00 UTC
> Well, looks like I'm using evdev now for my keyboard. X insisted that I
> provided a device path for my keyboard, i.e. one of the /dev/input/event*
> devices or one of /dev/input/by-*/*, both of which are highly annoying since I
> might decide to change keyboard or plug it into another USB port when I feel
> like it.
No, it does not mean you are using evdev. In your XKB_RULES_NAMES I see xfree86 which indicates the rules are taken from xfree86. If you were using evdev, the rules would be taken from evdev ruleset. Please check Xorg.0.log:

grep evdev /var/log/Xorg.0.log
Comment 15 Sergey V. Udaltsov 2009-02-04 16:50:36 UTC
I guess your xorg config is messed somehow.
Comment 16 Wouter Bolsterlee 2009-02-04 16:56:47 UTC
Created attachment 22594 [details]
New xkbcomp :0 output

You were looking at an old file I put up yesterday. Ouput after changing to evdev:

$ grep evdev /var/log/Xorg.0.log
(II) LoadModule: "evdev"
(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
(**) Option "xkb_model" "evdev"
(**) Input: xkb_model: "evdev"

I had to change the keyboard preferences from pc105 to evdev in the Gnome keyboard preferences (didn't know that was related), and now all keys work as they should.

However, the LED still switch on and off when I hit CapsLock (which acts as an additional Escape just fine).

I've attached a new server-0.xkb file.
Comment 17 Wouter Bolsterlee 2009-02-04 16:57:51 UTC
Oh, and fwiw:

$ xprop -root |grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "base", "evdev", "us", "", ""
_XKB_RULES_NAMES(STRING) = "base", "evdev", "us", "", "compose:ralt,caps:escape,grp_led:caps"
Comment 18 Sergey V. Udaltsov 2009-02-04 17:04:28 UTC
Ok, that make sense. I'll test your config ASAP.
Comment 19 Sergey V. Udaltsov 2009-02-05 15:20:05 UTC
I loaded your config again. It still works ok for me.

 xserver-xorg-input-evdev                   1:2.0.99
Comment 20 Sergey V. Udaltsov 2009-06-09 04:25:07 UTC
*** Bug 22142 has been marked as a duplicate of this bug. ***
Comment 21 Peter Hutterer 2014-11-11 23:51:20 UTC
5 years on, I'm closing this bug now. Last comment from svu was that the config worked, I just tested it on 2.11 and it works here too. Please re-open if this is still broken for you.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.