>> (p.1)
    Author Topic: Here is how to produce the ₿ (Bitcoin) symbol in xorg (Linux/BSD/etc) by keypres  (Read 236 times)
    Artemis3 (OP)
    Legendary
    *
    Offline Offline

    Activity: 2114
    Merit: 1576


    CLEAN non GPL infringing code made in Rust lang


    View Profile WWW
    December 30, 2018, 01:51:18 AM
    Merited by r1s2g3 (1)
     #1

    The (Bitcoin) symbol exists officially in unicode under code U+20BF since 2017 (Unicode v10). If you have a fairly recent Unicode font, such as Google's Noto, you can already see the Bitcoin symbol and use it by copy paste or unicode input along the traditional fiat symbols like $, £, €, etc.

    But wouldn't it be nice to have it at your disposal by just pressing a key? Well you can!

    xmodmap to the rescue. Yup, xmodmap can assign any key you like to produce this (or any other) unicode symbol.

    All you need to do is execute the xmodmap command. First take a look at your current settings with xmodmap -pke

    I noticed an unassigned key, menu with shift, so in my case i used:
    Code:
    xmodmap -e "keycode 135 = Menu U20BF Menu"

    The columns after = means what does the key do when you just press it, when you press it with shift, or when you use altgr. US keyboards might actually just need the first two, other more complex key combinations exist such as when the compose key is enabled (ie. a 4th column means altgr+shift, etc).

    If you add this to your user xmodmap config file, at ~/.Xmodmap then you don't need to repeat this command every time you login:
    Code:
    keycode 135 = Menu U20BF Menu

    If you want to use another key, or some unused key, you can use xev to find out the keycode, just run:
    Code:
    xev -event keyboard
    and press the key to find out its keycode. In Arch and its derivatives you need to install the package xorg-xev.

    And that is all, you can now just press your key and have the (Bitcoin) symbol ready for your chats or any other text typing.

    ██████
    ███████
    ███████
    ████████
    BRAIINS OS+|AUTOTUNING
    MINING FIRMWARE
    |
    Increase hashrate on your Bitcoin ASICs,
    improve efficiency as much as 25%, and
    get 0% pool fees on Braiins Pool
Page 1
Viewing Page: 1