0

It has become common to e.g. map Caps Lock to Ctrl as a modifier / Esc when pressed alone. I had an idea to do a similar thing with regular keys, e.g. j+w -> Ctrl+w, but j when pressed alone. I cannot find any resources on that though and I can see some potential problems, e.g. when typing fast one could trigger unwanted mappings. The solution to this particular problem could be using only uncommon sequences (e.g. j+w seems OK, but not j+a). Has anyone tried such a setup and/or can comment of its viability?

2
  • Please edit your question and mention your OS. Under Linux and X, you can use XKB and xcape to implement something like this. As to viability, I think it depends on your personal taste... I couldn't work with something like this, but that's just me.
    – dirkt
    May 2, 2022 at 9:22
  • It's OS agnostic, I'm just looking for experience with this approach, since I know I had problems when I tried to do similar thing with Space. I could do this myself, but I don't want to commit hours to developing a custom keymap just to find out that it's not going to work out. May 3, 2022 at 17:32

1 Answer 1

0

Tried something like that and eventually commented it out but I hadn't thought of a good way to have the key work normally when pressed alone(as in you immediately get j when you press j instead of when you release the key or such but somehow get no j if you press w too). But if you have some use case where getting the regular key's input in addition to your mapping isn't an issue I'd say it's viable.

I suppose you could also do something like have pressing a mapping try to remove the initial input before executing but that seems kind of troublesome.

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 2, 2022 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .