Page 1 of 1

How to: Enter special Unicode characters in Puppy

Posted: Sat 03 Mar 2018, 14:12
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:

Posted: Sat 03 Mar 2018, 14:22
by rockedge
totally helpful!! very nicely done...good info. :D

Posted: Sat 03 Mar 2018, 14:28
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:

Posted: Sat 03 Mar 2018, 16:10
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!

.

Posted: Sat 03 Mar 2018, 17:18
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.

Posted: Sat 03 Mar 2018, 17:27
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:

Posted: Sat 03 Mar 2018, 18:54
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:

Posted: Sat 03 Mar 2018, 19:12
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.

Posted: Sat 03 Mar 2018, 19:32
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:

Posted: Sat 03 Mar 2018, 19:49
by drunkjedi
Hey Mike,

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

Thanks again.

Posted: Sat 03 Mar 2018, 20:53
by Mike Walsh
drunkjedi wrote:Hey Mike,

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

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


Mike. :wink:

Posted: Sat 03 Mar 2018, 21:13
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.

Posted: Sat 03 Mar 2018, 23:20
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. :)

Posted: Sun 04 Mar 2018, 01:50
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:

Posted: Sun 04 Mar 2018, 03:25
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:

Posted: Sun 04 Mar 2018, 09:41
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.

Posted: Sun 04 Mar 2018, 10:08
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:

Posted: Sun 04 Mar 2018, 10:12
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.

Posted: Tue 20 Mar 2018, 22:58
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.