Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
32
rated 0 times [  32] [ 0]  / answers: 1 / hits: 114606  / 1 Year ago, fri, april 7, 2023, 9:06:49

When I'm programming, I find useful to use some unicode symbol like ← ↓ → to indicate in comments different things.


In Ubuntu I can type ← ↓ → respectively with Alt Gr + Y, Alt Gr + U, Alt Gr + I.


But to get the symbol "↑" I have to type Ctrl + Shift + U , and then 2191 (i.e. I have to insert the unicode code).


Is there a shortcut for the upwards arrow? If there isn't, how could I manually add it?


More From » gnome

 Answers
2

If you look at the file /usr/share/X11/xkb/symbols/latin, you will find the following lines:



key <AD06>  { [         y,          Y,    leftarrow,          yen ] };
key <AD07> { [ u, U, downarrow, uparrow ] };
key <AD08> { [ i, I, rightarrow, idotless ] };
key <AD06> { [ z, Z, leftarrow, yen ] };


So apparently an up arrow (↑) is already defined -- for ALT GR+SHIFT+U. If not, you can copy the file to a directory, edit it at will, name the profile somehow (say "foo" instead of "latin") and simply run



setxkbmap -I. -layout foo


(the -I. makes setxkbmap look for layout files also in the current directory).



The four strings assign to each key give the four characters that are produced by pressing the key, key with shift, key with altgr and key with algr+shift. The names of the entities (keysyms) that xkb can recognize can be found here.


[#29464] Saturday, April 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ongdiligenc

Total Points: 452
Total Questions: 111
Total Answers: 107

Location: Ukraine
Member since Sun, Dec 13, 2020
3 Years ago
ongdiligenc questions
Wed, Apr 13, 22, 10:34, 2 Years ago
Tue, Jun 7, 22, 00:54, 2 Years ago
Sat, Aug 7, 21, 00:37, 3 Years ago
Sat, May 22, 21, 03:06, 3 Years ago
Tue, Mar 1, 22, 10:05, 2 Years ago
;