What if I want to combine Ctrl+Shift+1+0 to obtain “≠”, for example? I’m saying this combination, like I could say any other (like a+b), it’s just one example.

  • palordrolap@kbin.social
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    A couple of options present themselves.

    1. If you’re willing to forego the key combination and can live with an alternative, you might want to check if your system supports the Compose key. It might not be bound by default, but it’s often put on Scroll Lock, or, if you have a non-US keyboard, to Shift+AltGr.

    Once the Compose feature is activated, certain sequences of keypresses can be, well, composed into a new character. Various “obvious” combinations are usually supported by default.

    e.g to get “≠” I hit Shift+AltGr, let them go and then type “/” followed by “=” (no quotes). It also works with the slash and equals in the other order. Some compositions only work in one order, but most work either way. Other symbols that are very much not on my UK keyboard include ä, é, ß, ¤, °, ±, ², etc. (Shift+AltGr followed by "a, 'e, ss, ox, oo and ^2 respectively).

    1. Check if your window manager has a keyboard configuration tool that allows the running of commands on certain key combinations. I use Cinnamon which has this.

    You could then set up Ctrl+Shift+0 (probably not 1 and 0 at the same time though) to run a command like sleep 0.5; xdotool type "≠".

    You’d need to install xdotool if you don’t already have it installed, and you’d have to get ≠ for the command itself from the Character Map or copying it from another source to avoid the Catch-22 there.