How to enter special characters in macOS , freebsd , Windows and html ?
Sometimes it is necessary to insert some special characters , for example ,
e accent which is
é , or to type in another language , such as Arabic , French , or Hebrew .
If it is to insert just few characters , or just few sentences , then a keyboard key sequence , or an onscreen character map , or keyboard , is sufficient .
If the text is large , what is needed , is the ability to switch between multiple virtual keyboard , while using the same keyboard , because typing in this case is faster ; or if the computer has a touch screen , using an onscreen keyboard will also work . The physical keyboard would preferably have , multiple language indicator .
Go to System preferences ⇾ keyboard , and select :
Show keyboard and emoji viewers in menu bar .
This will let you select , the emoji and symbols character map , and the onscreen keyboard , by clicking on the menu icon that appears after having selected the preceding option , and clicking on either one of : show emoji and symbols or show keyboard viewer .
You can customize the emoji and symbol list , by clicking on customize list , and adding the categories that you want to use . Add the unicode character set , by going to the
code tables category , and select
To insert a character , in a given program , just click or double click on it , be it on the on screen keyboard , or in the emoji and symbols map . You can also browse , search , view a character or related characters information , using the emoji and symbols map . If instead of double clicking , you right click a character , in the emoji and symbols map, you can copy the character information .
Next go to System preferences ⇾ keyboard , and select :
Input Sources , This is for adding a new keyboard layout . Click the plus sign ,
Choose the language that you want , for example let us say Serbian . Also select
Others , and select
Unicode Hex Input , to enable the keyboard key combination option .
Now if you want to enter a character using a keyboard escape sequence , you can switch to the
Unicode Hex Input keyboard , and use
alt , with the character code , in the unicode character set , in hexadecimal . The character code can be gotten from the
emoji and symbols map under character information . For example , to insert
a , you can use the key combination
To switch between keyboards , you can either select the keyboard that you want from the menu bar , or use the keyboard shortcuts
ctrl+space , to get to the previous keyboard , or
ctrl+alt+space to get to the next keyboard . To enable these keyboard shortcuts , you must go to System preferences ⇾ keyboard ⇾ Shortcuts ⇾ Input Sources , and check both options found under there .
For freebsd , and if you have xfce installed , to add multiple layout for the keyboard , go to
Application finder , and type
keyboard , and then click on
Layout , and uncheck the checked box :
Use system defaults , then under Keyboard layout , click on
Add , and select the
keyboard layout that you want , for example , in my case I have selected
Mongolian , and then click on OK . After that , assign a keyboard shortcut , to change the keyboard layout , under
Change layout option , in my case I have selected ,
Alt+Ctrl then click on close . Now you can switch keyboard layout , using the assigned keyboard sequence.
Next , it is time to add an onscreen keyboard , this can be done by installing the
florence port . as follows :
user $ su -
# gain root privileges .root $ pkg install florence
# install the florence package
To launch the florence on screen keyboard , go to
Application finder , type in
florence , click on launch , and the onscreen keyboard is ready to be used .
Now , it is time to install a character map , which will be used to insert characters , and get their information .
user $ su -
# gain root privileges .root $ pkg install KCharSelect
# install the KCharSelect character
# map .
KcharSelect , you can search for a character , using its name or code in the unicode character set , or using the character itself or its category or anything else ... You can browse characters using their categories , get their information such their code in the unicode character set , double click a character , and then copy it to the clipboard . For characters , that don't have a font installed , a square is shown instead of the actual character .
To insert any character , for example in the terminal , or using
Mousepad , you can use the keyboard escape sequence
CTRL+SHIFT+u , followed by the character code , in the unicode character set , in hexadecimal , followed by enter . The character code in hexadecimal can be gotten from the
KCharSelect program . For example , the letter
a , can be inserted by using
CTRL+SHIFT+u followed by
61 , and pressing enter .
For the terminal to be able to display unicode characters , you must set the shell to use the
utf-8 encoding , this can be done as follows :
user $ nano ~/.login_conf
# open the .login_conf file
# in your home directory ,
# and paste the following
# content .me:\
:lang=en_US.UTF-8:# Exit nano , and save using ,
# CTRL-X , Y , Enteruser $ cap_mkdb ~/.login_conf
# update the capability database ,
# by issuing this command .user $ shutdown -r now
# restart the freeBSD operating
# system , for this to take effects .
In the virtual console , which is before starting any
Xsession , or in other words , before starting a GUI environment , you can switch between keyboard layouts , by using the command :
user $ kbdmap
For other operating systems , the same methods can be applied , so a character map can be used to get information , and to insert characters , a key combination can also be used to insert characters , and a virtual keyboard , or changing the keyboard layout , can be used to insert large text .
As an example , under windows , an onscreen keyboard can be gotten by executing
⌘ + r , then typing in
osk , followed by an enter .
A character map can be displayed by executing
⌘ + r , then typing
charmap , and pressing enter .
Any character can be insert by typing in its character code in the unicode character set , in hexadecimal , followed by pressing the
alt+x key sequence . This will convert the character code , to the character it represents . This method , works for wordpad , and other programs .
For example to insert the latin small letter ʣ digraph , write down in wordpad
02a3 , and then press
alt+x , it will be converted to ʣ .
In html , any character can be insert , by writing down
For example the LATIN SMALL LETTER PHI , ɸ , can be insert , by writing down the escape sequence :
Originally published at https://twiserandom.com on December 20, 2020.