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

Getting no effects from xcape #107

Open MatthewCushing opened 5 years ago

MatthewCushing commented 5 years ago

I'm not sure what the issue is. I have it properly installed I believe. I have Arch Linux and I had it installed via sudo pacman -S xcape I've also tried cloning and building, making, and installing and that hasn't changed anything either.

My PC recognizes the xcape command. If I do a simple xcape - it will output Not a command line option: '-' Usage: xcape [-d] [-t timeout_ms] [-e <mapping>] Runs as a daemon unless -d flag is set However if I do something simple like xcape -e 'Control_L=Escape' I get absolutely no errors however it does nothing. My control key is the same. And I'm pretty sure in the readme it says that my control key should also act like an escape key by default and that's not the case either. On my laptop I have two files. The first one: setxkbmap -option ctrl:nocaps xcape -e 'Control_L=Escape and the second one: !remove Right Alt remove Shift = Alt_R ! add Mode_switch keycode 108 = NoSymbol No Symbol keycode 108 = Mode_switch keysym h = h H Left NoSymbol NoSymbol NoSymbol keysym j = j J Down NoSymbol NoSymbol NoSymbol keysym k = k K Up NoSymbol NoSymbol NoSymbol keysym l = l L Right NoSymbol lstroke Lstroke If I execute the first file ./firstFile and xmodmap the second xmodmap secondFile I am left with a caps lock key that acts as an escape key and control key as well as being able to hold down my right alt key and get a whole other keymapping although I only have hjkl mapped atm to up down left and right.
I tried doing the exact same setup on this pc and I get absolutely no results. I would love some help. I don't fully understand xcape and put together what I have through google and modifying it to make it my own. In addition, I wasn't able to get those two files working on startup on my laptop so I have an alias setup to run both of them when I type key in the terminal. If anyone can help me out with that as well it would be appreciated but first I need to get it working on my pc in the first place. On my laptop I have Ubuntu 18.04 installed if that makes any difference compared to this fresh install of Arch Linux with a gnome desktop on my pc. I'm also using "oh my zsh" on zsh instead of bash

Thanks!

rafaelcastrocarvalho commented 5 years ago

@mrcush Did you find a solution? I'm getting the same behaviour. Nothing happens with xcape on Archlinux.

Thaks.

MatthewCushing commented 5 years ago

@mrcush Did you find a solution? I'm getting the same behaviour. Nothing happens with xcape on Archlinux.

Thaks.

@zinho This was so long ago that I don't remember "fixing" my issue. However, I do have xcape working with my current setup. I will reply back later when I leave work and tell you what I have, and how I have it working. I'm running i3wm on Arch Linux and have had my script working so that my Caps Lock key is an Escape key if you tap it, but if you hold it it becomes a Ctrl key.

Again, check back a bit later (I should have posted by 5:00pm MST)

rafaelcastrocarvalho commented 5 years ago

Thank you for the prompt reply @mrcush.
I couldn't manage to use xcape with Archlinux but solved my problem with caps2esc: https://github.com/oblitum/caps2esc

twnaing commented 4 years ago

@zinho, I cannot disable or leave alone Esc key in caps2esc. Need to remove 3 lines of code and recompile to prevent Esc as Caps Lock.

@cushmatt , I am on Manjaro and xcape 1.2. It works when another instance is running.

#does not work in 1.2 but work in master branch
$ xcape -e 'Control_L=Escape' 
# now it does work 1.2 (might give two key with master branch)
$ xcape -t 500   

or xcope run in foreground/debug (for release 1.2)

$ xcape -d -t 500 -e 'Control_L=Escape'

Latest master has -f switch which allows running xcape in foreground.