alols / xcape

Linux utility to configure modifier keys to act as other keys when pressed and released on their own.
GNU General Public License v3.0
2.1k stars 117 forks source link

xcape with XkbOption ctrl:nocaps, escape not generated form capslock press until ctrl is pressed #62

Open hexken opened 8 years ago

hexken commented 8 years ago

with XkbOption 'ctrl:nocaps' when I start xcape using i3 config or in my .xinitrc xcape does not generate an escape from the capslocks key until I press the ctrl key atleast once. If I start xcape manually it works as it should.


Here is an example of the behaviour xcape exhibits when started in either i3 config or .xinitrc:

Assigned mapping from "Control_L" ( keysym 0xffe3, key code 37)
to "Escape" (keysym 0xff1b, key code 9)
sig_handler running...
Intercepted key event 2, key code 66
Intercepted key event 3, key code 66
Intercepted key event 2, key code 37
Key pressed!
Intercepted key event 3, key code 37
Key released!
Generating Escape!
Ignoring generated event.
Ignoring generated event.
^[Intercepted key event 2, key code 66
Key pressed!
Intercepted key event 3, key code 66
Key released!
Generating Escape!
Ignoring generated event.
Ignoring generated event.

Versus starting xcape manually on the command line, after i3 has started:

Assigned mapping from "Control_L" ( keysym 0xffe3, key code 37)
to "Escape" (keysym 0xff1b, key code 9)
sig_handler running...
Intercepted key event 3, key code 36
Intercepted key event 2, key code 66
Key pressed!
Intercepted key event 3, key code 66
Key released!
Generating Escape!
Ignoring generated event.
Ignoring generated event.

Here are my xkb settings:

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      thinkpad
layout:     us
options:    ctrl:nocaps
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)+ctrl(nocaps)
geometry:   thinkpad(us)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)+ctrl(nocaps)"        };
        xkb_geometry  { include "thinkpad(us)"  };
};

}
AnderRasoVazquez commented 8 years ago

I can confirm this bug.

kshenoy commented 8 years ago

I'm seeing this too.

owen-d commented 6 years ago

Also seeing this

rafaeln commented 5 years ago

It looks like xcape's original developer is not working on it anymore. Hope someone way more knowledgeable than me produces a fork sometime

bard commented 5 years ago

I switched to intersection tools and caps2esc. It's nice that it works independently from X (so also in console and Wayland) but I miss the timeout functionality.

allgreed commented 4 years ago

No idea how to fix it, however I was able to find a workaround in one of the closed issues.

Here's the workaround implemented in my dotfiles. I've tested it across reboots.