How to: Enter special Unicode characters in Puppy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

How to: Enter special Unicode characters in Puppy

#1 Post by Mike Walsh »

Afternoon, all.

This was brought to my attention by some research carried out for answering a question posed by a member on BleepingComputer.com.

I hadn't realised this until now, but it's essentially the Unix/Linux equivalent of the Alt/number keycodes in Windows.

There's a complete list of all the available Unicode characters to be found here:-

http://www.tamasoft.co.jp/en/general-info/unicode.html

It is a huge list, too...

--------------------------------------------

For instance, say you want to enter the heart symbol ( ) into your text. You look through that list, and locate the heart symbol. You then look to the far left of that line, which gives you "2660". You then look at the top of that column where the heart symbol is, which gives you "05". You add these two values together.....which gives you "2665".

Now; this is where the 'magic' happens. Press Shift + Ctrl together, and hold. Enter u (which tells the keyboard to expect a hexadecimal Unicode value), followed by 2665 (the value you've just obtained). Now, release the Shift + Ctrl keys. Voilà!

e.g hold Shift + Ctrl, enter u, 2665, then release.

That's all there is to it. Keyboards are, of course, capable of generating far more characters than you can see actually printed on the keys. This is the Linux way to do it..!

Have fun. ⌨ = ☺ ✔


Mike. :wink:
Last edited by Mike Walsh on Sat 03 Mar 2018, 17:21, edited 2 times in total.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#2 Post by rockedge »

totally helpful!! very nicely done...good info. :D

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

rockedge wrote:totally helpful!! very nicely done...good info. :D
Hi, rockedge.

Ah, well; I thought this might be of interest to some folks. I'm guessing the Unicode 'map' is a built-in part of every standard keyboard out there. There is a way of setting up keys on your keyboard to 'store' commonly used 'special' characters, which you then access using the AltGr key (to the right of the space bar) + whatever you've stored them under (say, 1 through 0 - the number keys, for instance). Kinda like a 'function' key..!

I haven't quite figured out the mechanics of this, yet. I think it can be done with xmodmap, although I'm not certain, TBH. If and when I do, I'll 'share' the 'how-to', here on this thread.


Mike. :wink:
Last edited by Mike Walsh on Sat 03 Mar 2018, 18:59, edited 1 time in total.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#4 Post by perdido »

Good info, Mike.

Just to consolidate some more info.

Forum member Geoffrey pointed us to a website that creates s̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ ̶t̶e̶x̶t̶ that can be copied and pasted into the forum.

Unicode strikethrough text tool

Keep on trucking!

.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#5 Post by drunkjedi »

That's a big list.

I was wondering how to type the Indian currency symbol ₹ (This I typed from android's keyboard) for some time.
It is shown on my PC's keyboard as third symbol on key '1'.
I don't know how to type it.
At first glance I didn't find it in that list too.
I will search carefully later.

Thanks.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

perdido wrote:Good info, Mike.

Just to consolidate some more info.

Forum member Geoffrey pointed us to a website that creates s̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ ̶t̶e̶x̶t̶ that can be copied and pasted into the forum.

Unicode strikethrough text tool

Keep on trucking!

.
Thanks for that reminder, Perdido. Yah, we may as well put all stuff to do with Unicode in here. The more, the merrier..!

I've had that link of Geoff's for, oh.....getting on for three years, I reckon. I first bookmarked it when we were working on the BitMeterOS bandwidth usage thread, over in Networking, back in early '15. I guess I've used it perhaps 4/5 times since then; not going to get used every day, but useful to have available, nevertheless.

Cheers.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

drunkjedi wrote:That's a big list.

I was wondering how to type the Indian currency symbol ₹ (This I typed from android's keyboard) for some time.
It is shown on my PC's keyboard as third symbol on key '1'.
I don't know how to type it.
At first glance I didn't find it in that list too.
I will search carefully later.

Thanks.
@drunkjedi:-

You're looking for rupees, yes? I believe this ("₨") is what you're looking for...

Try Shift + Ctrl (hold): u, followed by 20A8.....then release Shift + Ctrl.

Let us know if that works.


Mike. :wink:

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#8 Post by drunkjedi »

Hey Mike,
That was not the symbol I was looking for it's old symbol, but thanks for taking time to search, as I found what I was looking for in the same row in column 19, that's the new symbol.
So 20A0 + 19 = 20A19.
Am I right?
I can't test now as it's almost 1 am here.
I just woke up to change diaper of my 3 weeks old daughter.
I will be going back to sleep now.

Cya later.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

@drunkjedi:-

I'm not 100% certain of this hexadecimal stuff, but I know it's only a 4-digit value. I think what you want is "20B9"....


Mike. :wink:

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#10 Post by drunkjedi »

Hey Mike,

Yup, you are right.
It's 20b9.

Thanks again.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#11 Post by Mike Walsh »

drunkjedi wrote:Hey Mike,

Yup, you are right.
It's 20b9.

Thanks again.
No worries, dj. Glad to help.


Mike. :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#12 Post by musher0 »

Hello drunkjedi and all.

First, @drunkjedi: congratulations to you and your wife for the successful "manu-
facture" ;) of a baby daughter! :D To her: may she have a long and interesting life!

~~~~~~~~

Back on subject:
To my knowledge, if any character is written as the 3rd character on a keyboard
key, you can type it by hitting Right-Alt-key plus the character.

On my keyboard, the very common @ character is the 3rd character on the "2" key.
To type it, I type < Right-Alt-key + 2 >.

For these, you do not have to do the finger gymnastics suggested by Mike_Walsh!
Although the table he found and his advice on using it are indeed most useful.
Also, finger gymnastics -- and gymnastics generally -- are good for you! ;)

drunkjedi, for your Indian currency symbol, maybe try typing < Right-Alt-key + 1 >?
What happens?

On my keyboard, I get a £ (British pound) symbol if I type < Right-Alt-key + 3 >.
I guess this is the first time I have used it... but it is there.

Which brings me to:
the French use the AZERTY keyboard, the Swiss (also the Germans, I think) use
the QWERTZ keyboard, Americans use the straight QWERTY keyboard, we
Canadians use a modified QWERTY keyboard. And certainly there are other
keyboard layouts in the world: Dvorak, etc.

@Mike_Walsh:
Do such keyboard layouts influence the use of your multi-numbered table?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#13 Post by Flash »

Mike, the results of this investigation of how to move the cursor to the center of the screen with a single key stroke might be useful to you. You'll need to read the whole thing, but it's only 3 pages long. :)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#14 Post by Mike Walsh »

@musher0:-
musher0 wrote:@Mike_Walsh:
Do such keyboard layouts influence the use of your multi-numbered table?
I don't think they would, mate. If you scan through the whole thing, although large chunks of the hexadecimal codes aren't actually in use, you'll see references to Greek, Arabic, Cyrillic, French, German, Scandinavian, Chinese/Japanese, etc.....moreover, if you click on 'Contents' (top-right corner), you'll also find a bunch more character code maps, too.

I think you'll find these Unicode characters are completely independent of keyboard layouts, and are 'standardised' across the board. Especially since Unicode replaced ASCII-2 throughout the Linux 'eco-sphere' quite some years ago; at least a decade or so. AFAICT, the Unicode 'character map' is an integral part of every single keyboard ever manufactured during the last 10 years or more.....

-------------------------------------

@Flash:-

Thanks for the link. Sounds like it could come in useful; I shall investigate.

Cheers.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

@Flash:-

That's pretty useful, mate!

I couldn't help noticing that folks were coming up with all manner of complicated suggestions for how to key-bind in ROX/JWM.....which is a piece of cake, by the way (and merely involves a wee edit to /etc/xdg/templates/_root_.jwmrc.)

I've implemented this in Racy 5.5.....which is as close as I could get to your earlier version of Racy.

-----------------------------------------------------------------------

1. I got xdotool from technosaurus's thread, here. I untarred it, and stuck it in /usr/bin.

2. I've written a small script, called cursor-centre.sh, as follows:-

Code: Select all

#!/bin/sh
#
# Location script for centering cursor in middle of screen. @Mike_Walsh, March 2018. With thanks to Flash, jamesbond & technosaurus.
#
xdotool mousemove --polar 0 0
...which I've placed in /usr/sbin, and made executable.

3. Lastly, I've bound this script to the 'Insert' key.....which I never, ever use. (I agree with ETP about not binding to a Function key; he's right, there's no telling what function keys have been implemented by app authors.)

Open up /etc/xdg/templates/_root_.jwmrc, and add the following to the end of the 'Key-bindings' section, down near the bottom (not the 'key-masks'):-

Code: Select all

<Key key="Insert">exec:/usr/sbin/cursor-centre.sh</Key>
Run 'fixmenus', and restart 'X'. Now, a simple press of the Insert key centres the cursor in the middle of the screen. Nice one. (Yes, I know /usr/sbin is 'in the path', so doesn't really need to be specified.....but I've kinda got into the habit of always specifying full paths to everything. Less chance of confusion that way!)

What you really wanted all those years ago was that thing MyCrudSoft have built-in to Windows, where you can set things up so that by pressing 'Ctrl', you get a kind of circular 'flash-ripple' effect radiating out from the cursor. That definitely draws your attention to it..!

I've run up a wee .pet for this, with a READ-ME for the keybinding instructions which will be found in /root. Hope some of you may find this useful.

Cheers!


Mike. :wink:
Attachments
cursor-centre-0.0.1.pet
Utility for centering your cursor mid-screen (for easier location). Uses xdotool.
(31.21 KiB) Downloaded 174 times

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#16 Post by drunkjedi »

musher0 wrote:First, @drunkjedi: congratulations to you and your wife for the successful "manu-
facture" ;) of a baby daughter! :D To her: may she have a long and interesting life!
Thanks for the wishes sir.
musher0 wrote:To my knowledge, if any character is written as the 3rd character on a keyboard
key, you can type it by hitting Right-Alt-key plus the character
That's what I read on net, but it doesn't happen on my pc. I don't know why. Anyways I don't use the symbol either, but it is printed on keyboard and I was just wondering how to type it.


@everyone,
While looking at that table I found that many symbols are shown as squares with it's codes written inside.
When I boot without savefile, even the indian language symbols are shown as those code squares, because in savefile I have Indian fonts placed in /usr/share/fonts/X11/TTF/.

While a android smartphone shows all the symbols even all chinese or other language characters.

That's got me wondering is there any font file or set of files that would enable all symbols to be shown correctly in that table???



Here's another site with clickable and search-able (if you know the name of symbol) table.
Clicking on a symbol gives some info about it and it's code.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#17 Post by Mike Walsh »

Thanks for that, dj.

That's a better version in some ways.....because it actually gives you the individual code for each symbol. The one I referenced earlier requires you to work out the value (which isn't always easy in hexadecimal...)

Cheers.


Mike. :wink:

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#18 Post by drunkjedi »

Yeh plus it's search-able, so I am searching and writing down few.

Like some fractions, square root, cube root and few more.

Thanks again for this Mike.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#19 Post by Puppus Dogfellow »

Mike Walsh wrote:Afternoon, all.

This was brought to my attention by some research carried out for answering a question posed by a member on BleepingComputer.com.

I hadn't realised this until now, but it's essentially the Unix/Linux equivalent of the Alt/number keycodes in Windows.

There's a complete list of all the available Unicode characters to be found here:-

http://www.tamasoft.co.jp/en/general-info/unicode.html

It is a huge list, too...

--------------------------------------------

For instance, say you want to enter the heart symbol ( ) into your text. You look through that list, and locate the heart symbol. You then look to the far left of that line, which gives you "2660". You then look at the top of that column where the heart symbol is, which gives you "05". You add these two values together.....which gives you "2665".

Now; this is where the 'magic' happens. Press Shift + Ctrl together, and hold. Enter u (which tells the keyboard to expect a hexadecimal Unicode value), followed by 2665 (the value you've just obtained). Now, release the Shift + Ctrl keys. Voilà!

e.g hold Shift + Ctrl, enter u, 2665, then release.

That's all there is to it. Keyboards are, of course, capable of generating far more characters than you can see actually printed on the keys. This is the Linux way to do it..!

Have fun. ⌨ = ☺ ✔

Mike. :wink:
cool find. thanks, Mike.

copying and pasting works fine, too (middle click after a select is also pretty linuxy, i think).

i copied a bunch to a text file for leafpad to open--much smaller utility than guchar.

thanks again.

Post Reply