-
Generating ASCII chars
Could someone please explain me why -in X window- the ´Alt´ + number combination doesn´t produce the desired ASCII character?
Every time I try to do that on a term window it only replaces the prompt and generates this:
Where xxxx is the string of numbers that I type in the numeric keypad....
Thanks a lot.
-
The key sequence you're using is not used to display a character by it's ASCII code, but rather to print n number of character c as in:
alt+005e
would print out eeeee.
I thought I remembered a key sequence to do exactly what you want, but for the life of me, I couldn't remember it. However, a simple scrip called, say a2c, for ASCII to Character, could be written with the following line:
echo -e "\x$1"
This form takes a ASCII hex value of the desired character. If you remove the x, then it will take the octal value of that character. I'm not sure if this is what you were looking for, but hey, it's free. LOL -mk
------------------
If it ain't broke, fix it till it is.
-
I'm afraid you lost me ;->... Or better yet, I lost you...
No, I don't understand you, what I was trying to say is that in Window$ that other OS, if you type:
Code:
Alt [key press] + [number pad] 064
You get an: "@"...
In linux, I can do that in the command line, but once X is up I can´t, not in a Xterm, not in a Rxvt, not in Abiword...
Do I have to change something in my xkbmap? in XF86Config?
Thanks, and excuse me for being such a dumheit...
-
I missed the point about using the keypad, instead of the numeric keys across the top of the keyboard. The behaviour I described is valid for using those keys in both the console and an xterm window. The keypad, well, that's completely different. Sorry about my mis-read.
I am at a loss to explain the different behaviour using the keypad, though. -mk
------------------
If it ain't broke, fix it till it is.
-
Mike, I've tried using the number keys that are above the letters... Same problem... I can't generate any god damn ASCII character this way...
Any idea is welcomed.
Perhaps this is related to the xbkmap that I'm using...