Questions tagged [xcape]

a utility to configure modifier keys to act as other keys when pressed and released on their own

XCAPE

From Github ReadMe:

xcape allows you to use a modifier key as another key when pressed and released on its own. Note that it is slightly slower than pressing the original key, because the pressed event does not occur until the key is released.

The default behaviour is to generate the Escape key when Left Control is pressed and released on its own.

All modifier keys can be assigned useful second purposes. In conjunction with several more modifiers can be created and leveraged with to have a keyboard with even more mapping and short-cutting possibilities.

On modern distributions installation is easily done through the package manager: Debian, Arch, ...

Configuration example for Caps-Lock as ESCAPE and SUPER

13 questions
10
votes
3 answers

How to allow chords of keyboard keys to change the keymap temporarily?

I have really gotten used to the "Simultaneous Vi Mode" functionality of KeyRemap4MacBook which lets you press and hold the s and d keys simultaneously and then use the h, j, k, and l keys as the arrow keys. When s and d are pressed together, no s…
ws_e_c421
  • 519
  • 1
  • 6
  • 17
8
votes
1 answer

Using xcape + xmodmap to change some keys

Using xcape and xmodmap, how does one Make the CAPSLOCK key behave as a SUPER modifier key when pressed in conjunction w/another key. Make the CAPSLOCK key function as the ESCAPE key when pressed on its own.
George
  • 1,799
  • 2
  • 25
  • 30
5
votes
1 answer

Advanced key mappings in linux

I am using manjaro i3 and am looking into revamping some of the key mappings I have made. Currently I am using xcape, xmodmap, and setxkbmap commands to remap the following keys: caps to contol when held, escape when pressed swap semi colon and…
bwrabbit
  • 153
  • 1
  • 4
3
votes
1 answer

Turning the Escape key into a modifier that still acts as Escape when tapped

I use a tiling window manager (xMonad at the moment), and due to this I need a key that acts as the ‘control key’ for window management. Whenever I use a keyboard with Windows/Super/Mod4 keys, I use the left Windows key as that key, while my right…
Lustique
  • 133
  • 5
2
votes
1 answer

How can I replace my keyboard and mouse udev rules with xorg.conf.d?

Since it is impossible to make udev rules that affect Xorg settings run on startup, I'd like to replace these with other alternatives. At the moment, I have two primary udev scripts that I've written. The first changes keyboard layout when the…
Sparhawk
  • 19,561
  • 18
  • 86
  • 152
1
vote
0 answers

mapping backslash to modifier with xcape preserving pipe character

My keyboard has a backslash key which when shifted is a pipe character. I want to map it in xorg to a Hyper modifier when held, and its default behaviour when pressed. I have added the following code to my .xinitrc: xmodmap -e "keycode 23 =…
jameh
  • 211
  • 1
  • 7
1
vote
1 answer

Map right alt to left arrow on MacBook Pro with Kali Linux

I’ve just created a Kali Linux partition on my MacBook Pro. On Mac OS I used Karabiner Elements to remap the right alt key to left arrow because my real left arrow key is broken. Now I want to do the same thing on Kali. To do so I installed xcape. I…
HerthaBSC
  • 11
  • 2
1
vote
0 answers

Remap capslock and enter to control modifier

I want to remap two keys, not just one. Specifically, I want to: Remap capslock to control and escape, and Remap return/enter to control when it is pressed with another key. Based on the two links above, I managed to remap each key separately…
Sohrab
  • 11
  • 2
1
vote
1 answer

Remap Esc to Caps Lock after mapping Caps Lock to Ctrl and Esc with xcape

I currently have Caps Lock mapped to Ctrl when held and Esc when tapped (for vim) via these commands in .xinitrc setxkbmap -option 'caps:ctrl_modifier' xcape -e 'Caps_Lock=Escape' This works, but leaves me without Caps Lock so I want to remap Esc…
hopibel
  • 130
  • 1
  • 5
0
votes
2 answers

Map Caps Lock to AltGr and Escape - why does setxkbmap silence xcape daemon?

I'm on a 20.04 Ubuntu machine. I've been trying to use a combination of setxkmap and xcape to map AltGr and escape onto my caps-lock key, where a quick key press acts as escape and a longer key press acts as AltGr. I believed the desired behavior…
DBJ
  • 1
0
votes
1 answer

Use ISO_Level3_Shift as Escape when tapped

I use an alternative keyboard layout that uses CapsLock and # as ISO_Level3_Shift modifiers. setxkbmap de koy I also like using CapsLock as additional Escape key when it's just tapped. This can be easily reached by: xcape -e…
MaxGyver
  • 289
  • 2
  • 8
0
votes
1 answer

Execute a command if F+J keys are pressed

What would I need to do if I wanted to execute: chromium & by pressing F+J ? Preferred requirements: Globally accessible across Desktop Environment Independent of terminal focus or not Without using modifier hack in other words if F OR J is held…
Danny Z
  • 181
  • 1
  • 3
0
votes
1 answer

Installing Xcape (question involving the "make" command)

I executed the minimal building directions of xcape: $ sudo apt-get install git gcc make pkg-config libx11-dev libxtst-dev libxi-dev $ mkdir xcape $ cd xcape $ git clone https://github.com/alols/xcape.git . $ make But when I press xcape it says…
George
  • 1,799
  • 2
  • 25
  • 30