Git Product home page Git Product logo

Comments (6)

zkf avatar zkf commented on May 27, 2024 1

Yes that is exactly what I did, I don’t want to modify the system files because they are overwritten whenever XKB receives updates. After a long time I found this solution. I think this is how it works: setxkbmap searches for the rules file in the current directory first, so it is picked up instead of the one in /usr/share/X11/xkb (it even tells you so, if you pass it -verbose 9), Then with the -print option it does not apply the configuration, it just prints it. Otherwise setxkbmap would try to use the other files in the system directory anyway. I pipe this to xkb, clearing the default include path with the empty -I argument, then I include the current path, with fallback to the system default.

Oh, -I/usr/local/share/X11/xkb can be written more succinctly as -I., because you already cd’ed into this directory.

One problem I’m having with this is that the layout can be reset by replugging USB devices, or switching to a different TTY and back. It may be my desktop environment, KDE, is a bit too eager with applying configurations. I’m not sure yet.

I think you can keep the XKB files wherever you choose.

I just tested the latest commit. Unfortunately, Ext+Q is still not doing anything. Well, it looks like it’s registering as Escape in xev, but nothing happens when I test it in the terminal emulator or vim.

from bigbagkbdtrixxkb.

DreymaR avatar DreymaR commented on May 27, 2024

Hei Bjørnar! ( のvの) c[_]

Thanks for the praise! And for useful info. I'm sorry the Ext+Q mapping still doesn't work. I'll look into this. I think the 2015 code at least had the same mapping as up until now, so the problem may stem from changes to the XKB interpreter.

Out of curiosity, why do you set the layout in this particular way? It looks to me as if you copy the X11/xkb directory to somewhere else and use the xkbcomp command to use it? This should be a safer way of using my files, but I never got it to work before. Looks like you can use the -I for xkbcomp twice, that's useful!

Would this work, then?

  • Copy the xkb-data_mod/xkb dir to, say, /usr/local/share/bigbag/xkb // [are there any rules for where to use?]
  • setenv MYXKB "/usr/local/share/bigbag/xkb" // [Not necessary, only if you want to keep track of it]
  • setxkbmap -print | xkbcomp -I -I$MYXKB -I/usr/share/X11/xkb - $DISPLAY

[edit:] Okay, I think I may have found the culprit. I updated the Ext+LeftBracket mapping which is also Esc, but not the Ext+Q one. Will push a new commit shortly, please test it for me?

from bigbagkbdtrixxkb.

DreymaR avatar DreymaR commented on May 27, 2024

I have removed the level5 modifier from Ext+Q so it should no longer register as both Esc and Caps but only as Esc. So for some people it did two things, which was one too many. If the combo does nothing for you, I'm really not sure why that could be...? Sorry. ᏊᵕꈊᵕᏊ

from bigbagkbdtrixxkb.

zkf avatar zkf commented on May 27, 2024

Okay, so I just tested nvim in two different terminal emulators. And to my surprise, in xterm the Ext+Q combo works as Escape! However, it does not work in kitty, nor in Konsole/Yakuake which I use normally.

Separately, I looked at the output from xev and noticed that pressing and releasing the caps lock key registers as KeyPress … ISO_Level5_Shift and KeyRelease … ISO_Level5_Lock, respectively:

KeyPress event, serial 38, synthetic NO, window 0x8400001,
    root 0x1a3, subw 0x0, time 38468792, (2713,1136), root:(2713,1446),
    state 0x0, keycode 66 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x8400001,
    root 0x1a3, subw 0x0, time 38468856, (2713,1136), root:(2713,1446),
    state 0x20, keycode 66 (keysym 0xfe13, ISO_Level5_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

This seemed suspicious so I replaced some occurences of ISO_Level5_Lock in order to make this output consistent, but this made no difference to the Ext+Q situation.

One final thing which may be related: Pressing the Caps lock key performs a paste from the clipboard in certain KDE applications (maybe all?), but not in GTK based ones like Firefox.

I can upload the XKB file generated by xkbcomp, if that helps in any way?

from bigbagkbdtrixxkb.

zkf avatar zkf commented on May 27, 2024

stdin.xkb

from bigbagkbdtrixxkb.

DreymaR avatar DreymaR commented on May 27, 2024

Whether the Lock or Shift is released shouldn't matter. I believe the Lock overrides and includes the Shift anyway. And the Level5 shift state should be removed with the key press action for this to work (which is what the bug I fixed was about, you know).

The Caps-Paste thing has been mentioned before I think. It's a bit of a mess if I understand it right.

I'm no further to an answer to your problem, unfortunately.

from bigbagkbdtrixxkb.

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.