This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to use ASCII codes on keyboard?

Tags: None
(comma "," separated)
User avatar
wferreira
Registered Member
Posts
58
Karma
0
OS

How to use ASCII codes on keyboard?

Mon Nov 07, 2016 8:26 pm
Please someone can help?

I need use ascii codes in keyboard, example: Alt+92. But when I input the Konsole show: "(arg: 92)"...

How to fix?


LPIC-1 SysAdmin l Entrepreneur - IT Enthusiast
XFCE & KDE Plasma
steinhr
Registered Member
Posts
17
Karma
0
OS
Here is one way. For instance, some tiny wireless keyboards may lack the Ascii 126 code, which is ~.

To get Ascii 126 fairly quickly you can make a script called eg just 'a' that puts this into the clipboard, so that SHIFT+CTRL+V will enable you to use it in Konsole in Neon KDE Linux while in the midst of typing (as long as you don't use the clipboard for something else). Here is one way. This way uses Wayland, but similar solutions exist (look up 'xclip' and simiar) if you have to use X Windows. In a file called 'a', put in this; use eg kwrite:

Code: Select all
printf '%x' {126..126} | xxd -r -p | wl-copy


Put this file to /usr/bin using the sudo -i command:
Code: Select all

sudo -i
cd /usr/bin
cp -i /home/YOURUSERNAME/a .
chmod 755 a


Each time you type

Code: Select all
a


on the Konsole, the number you typed into a will be converted to the Ascii character and put into the clipboard. You can write 33..126 for all the 7-bit standard Ascii set, to get them all at once. By the way, check that xxd and wl-copy both are installed.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]