Friday, November 25, 2016

Typing the € symbol in a linux system

For infrequent users:

If you use English (US) keyboard layout and you don't want to change it, the the fastest way would be to use Ctrl+Shift+U key combination and then type 20ac followed by Space(or Enter) which will turn into .


The Xorg solution:

In your keyboard layout settings choose Options -> Add currency signs to certain keys then choose the key you can use to activate that option by changing the option Key to choose 3rd level (or 4th depending on which level your currency symbol is. you can get the full keycodes by using xmodmap -pke in console)
For this you can choose use Win key, its useless in Linux anyway, so you might as well find some use for it.



The console solution:

xmodmap -e "keycode 13 = 4 EuroSign 4 EuroSign"
xmodmap -e "keycode 13 = 4 dollar 4 dollar"
xmodmap -pke > .xmodmap
xmodmap .xmodmap

Now if you want, for example, to change the $ sign (which you can type it using Shift+4 shortcut when you have an US English keyboard) with sign, you can use the following command in terminal in terminal:
From now you can type using Shift+4 shortcut.
To switch back to $ sign, use:
To get this change for every session, create a file called .xmodmap, with the following command:
Then, create a file called .xinitrc in your home directory, containing the following line/command:
In the same mode you can set any other key combination to type symbol. Use xmodmap -pke command to see all keycodes and their map assignment.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.