Giter Club home page Giter Club logo

Comments (3)

dadaurs avatar dadaurs commented on August 30, 2024 3

I also had the same issue

The easiest way I found to circumvent this was to use xmodmap to essentially reconfigure the backslash character.
The way you do this is by simply running

xmodmap -e "keysym  backslash = backslash bar"

After you've run this, everything should be back to normal

from xcape.

supremesnickers avatar supremesnickers commented on August 30, 2024

I had similar issues using xcape in combination with Xmodmap while trying to replicate Ethan Schoonover's modifier setup. Xmodmap:

clear mod4
keycode 23 = Hyper_L
keycode 51 = Hyper_R
keycode 133 = Super_L
keycode any = Tab
keycode any = backslash

When I now run xcape -e "Hyper_L=Tab;Hyper_R=backslash", pressing tab by itself gives both Hyper_L and tab, pressing the backslash key by itself also gives both Hyper_R and backslash. Pressing Shift together with those keys doesn't make any difference.

I analyzed the pressed keys with this command: xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'.

from xcape.

jaavedd9 avatar jaavedd9 commented on August 30, 2024

After spending too much time, the following ~/.xession worked for me, @supremesnickers I was facing the same issue and it was causing my machine to hang when hitting backslash + tab it was getting into never ending loop. Some how this script works, I don't understand all of it though, figured out by hit and trial. My OS is Debian 11.

#!/bin/bash
# hyper keys configs that worked
# from https://github.com/Zetagon/dotfiles/blob/master/xsession
# xbindkeys --defaults > $HOME/.xbindkeysrc


# kill xcape process, without this everytime this script is run it is multiplying backslash and tab keys 
# multiple xcape process causing this issue
pkill xcape
xbindkeys
# Log stderror to a file 
#exec awesome 
#    # No error logging
#    #dwm >/dev/null 2>&1
setxkbmap -option "caps:ctrl_modifier"
setxkbmap -layout us,se -option grp:shifts_toggle

# Make tab a superkey when held down, tab when pressed alone
xmodmap -e "keysym Tab = Hyper_L"
xmodmap -e "remove mod4 = Hyper_L"
xmodmap -e "keycode any = Tab"
xcape -e "Hyper_L=Tab"

# Make backslash a superkey when held down, backslash when pressed alone
xmodmap -e "keysym backslash = Hyper_R"
xmodmap -e "remove mod4 = Hyper_R"
xmodmap -e "keycode any = backslash"
xcape -e "Hyper_R=backslash"

# to restore pipe when clicking blackslash with shift
# from here https://github.com/alols/xcape/issues/120
xmodmap -e "keysym  backslash = backslash bar"

from xcape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.