Is there a way where instead of pressing the key combinations, I can activate a mode and type in the key combination in words? For example I would type in something like control shift s to mean the key combination Ctrl+Shift+S, without actually pressing the combination. That is, I want to create verbose aliases for some difficult to reach keys and when I just type out those aliases, the machine should behave as if I had pressed the key combination instead.

I would like this to work across applications. For example it should work on my browser, on my editor etc. It should work on any future application that I may ever install.

That is I need an interface/filter/translator between my keyboard and the OS, that will translate what I type into appropriate commands or key combinations.

For example say I am in Libre Office where Ctrl+P is used for Print command. Then I would want to do something like this: Type control p instead of pressing Ctrl and P together. And that should get translated to the correct key combination and fed into Libre Office.

In particular it shouldn't matter what application I am using.

This is how I imagine it to work (I am adding all these details to explain more clearly what I am looking for):

  1. Say I want to press Ctrl+Shift+R
  2. Press a special key combination say Alt+[ and that would activate this "translation" mode.
  3. Type control shift r. While typing I may use backspace. For example the key strokes may be: com(backspace)ntri(backspace)ol S(backspace)shift,(backspace) r. Then that should just mean control shift r because if I were to type that out on an editor, it would be that.
  4. Press a special key combination say Alt+]. That would then "translate" everything that was typed between the first special key Alt+[ and the last special key Alt+] and send the key combination Ctrl+Shift+R to the machine.

Is there a solution to the problem?

  • A script that uses xdotool to map typed words to keypresses, maybe. – muru Apr 19 '17 at 4:16
  • Yes I have been thinking along similar lines now. I would have a python script to interpret the command. And the script would key in the combination (may be by using xdotool). I am just waiting to see if someone would have already done this. – Inspired_Blue Apr 19 '17 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.