Numeric Keypad Alt Codes

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Numeric Keypad Alt Codes

Post by Dark Owl »

Sorry about this, the forum search ignores "alt" as too short.

Sorry about this too - but I am so steeped in Windows (been using it practically daily since the '90's) that it is natural for me (when word processing) to do (say) Alt-0150 on the numeric keypad to enter an En-dash. This, of course, doesn't work on Linux and I don't want to be learning a whole new way of working - that's why I chose Mint (to be as Windows-like as reasonably possible).

So, please don't say "do it like this", I am perfectly capable of finding out how to do it. What I want to know is whether there is some kind of add-on which can pick up Alt-0150 and type a "–".
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Re: Numeric Keypad Alt Codes

Post by Dark Owl »

Nobody have anything to offer?
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

nielo
Level 1
Level 1
Posts: 45
Joined: Tue Mar 22, 2011 7:44 pm

Re: Numeric Keypad Alt Codes

Post by nielo »

You could read this https://unix.stackexchange.com/question ... mpad-codes then, unless you already know all about a "Compose" key - which I did not! - then you could read this: https://unix.stackexchange.com/question ... mpad-codes

To set the "Compose" key in my installation of Linux Mint Cinnamon 19.3, I go to:

System Settings - Keyboard - Layout - Options - "Position of Compose Key"

User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Re: Numeric Keypad Alt Codes

Post by Dark Owl »

nielo wrote:
Wed May 06, 2020 3:09 am
You could read this https://unix.stackexchange.com/question ... mpad-codes then, unless you already know all about a "Compose" key - which I did not! - then you could read this: https://unix.stackexchange.com/question ... mpad-codes

To set the "Compose" key in my installation of Linux Mint Cinnamon 19.3, I go to:

System Settings - Keyboard - Layout - Options - "Position of Compose Key"
I am very grateful for your reply, but you seem to have posted the same link twice (I don't think that was your intention).

I got very excited to start with, but then realised the linked info was for inputting a character using its Unicode (which is not in my memory bank) instead of Alt codes (which is). Having to memorise a whole new input mapping is the last resort, because I expect to be alternating between Linux and Windows for quite some time.

(And age is a factor here: younger people do not understand how "burnt in" information can be, and how difficult it becomes to retain new information. When the IT department staffed by twenty-somethings enforces changing passwords every month, they have no consideration for the fifty-somethings they are supposed to be helping.)

To illustrate my point: in Windows, Alt-0150 produces an en-dash, but the Unicode equivalent is (apparently) 2013 hex... which just happens to use decimal digits, but could equally well include letters which means it could not be entered by simply using the numeric keypad. And my muscle memory is for the numeric keypad.

My searches have come up with nothing, and the notable lack of replies to my enquiry indicates there is no answer to this. Mint is (I understand) Windows-like to make it easy to switch, but it seems that only goes less than skin deep.

It seems to me there is scope to provide a utility which provides a translation layer between Alt-numeric entry and Unicode, especially for the more sophisticated Windows user like me - who just needs to get stuff done with minimum fuss. I know experienced Linux users/programmers don't need such a utility, but it would be a pretty simple job for the programmer-types to knock one up, surely?
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

nielo
Level 1
Level 1
Posts: 45
Joined: Tue Mar 22, 2011 7:44 pm

Re: Numeric Keypad Alt Codes

Post by nielo »

Sorry I posted the wrong link, the one I think I was referring to is here: https://community.linuxmint.com/tutorial/view/1351.

My first language is Welsh and, for many decades, with MS Windows I was forever fiddling with ALT+nnnn to insert letters which are non-standard in English. Letters such as â ê î ŵ ŷ (and their upper case versions). In linux, I find all that I need in the Latin Extended-A Unicode Block of Character Map (gucharmap). That doesn't mean to say, of course, that you'll find what you're looking for... Nevertheless, best of luck with it.

User avatar
AndyMH
Level 11
Level 11
Posts: 3991
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Numeric Keypad Alt Codes

Post by AndyMH »

For years I also used Alt+0150 for an en-dash and then word started doing it automatically when you typed - something, so stopped doing it. If you don't want to learn a whole new set of codes use the auto-replace function in your word processor (I still use word running under crossover/wine - too old to change). I routinely set up word so that ¬ is automatically translated into [autonumlgl] + tab, you could replace -x with en-dash or whatever key-combo suits you.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Re: Numeric Keypad Alt Codes

Post by Dark Owl »

Yes, I understand your point, but the en-dash is just one example and your suggestion is not extensible (it's another set of codes, however you want to look at it). Personally, I hate auto-substitution - do what I tell you, not what you think I told you!

Incidentally, I deliberately made the jump from Word to OpenOffice some years ago - but then I don't have to collaborate with Word users, which would be impossible without Word (and don't let anybody tell you otherwise). OpenOffce/LibreOffice is perfectly okay (mostly), but uses a different concept for section formatting that you have to get your head around. I have tried to discuss some points with the OpenOffice developers, but they seem more interested in software than niceties of authoring. Maybe Libre will be more accommodating. For example: the "show non-printing characters" function only shows some of them - if a series of non-printing characters (eg spaces) happens to bleed into a margin, they stop showing!
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

User avatar
AndyMH
Level 11
Level 11
Posts: 3991
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Numeric Keypad Alt Codes

Post by AndyMH »

do what I tell you, not what you think I told you!
I have that problem between my brain and fingers, brain thinks 'quick brown fox' and I look and I've typed fact instead of fox or when instead of went. I'm slowly 'learning' a set of unicode numbers having also only recently discovered the compose key.

Have you looked at WPS office (it's chinese, screen looks very like word), I've got it but don't use it much. There is a deb you can download.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Re: Numeric Keypad Alt Codes

Post by Dark Owl »

WPS Office? No thanks, I would rather stay reasonably main-stream.

I use an iPad for casual stuff like email and forum browsing - and it's not at all uncommon it doesn't write what I typed... you only have to be marginally off a keypad press for it to substitute a different word or even phrase, and don't get me started on capitalisation! Unfortunately, turning auto-correct off is even more of a disaster when using a touch screen.
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

User avatar
MrEen
Level 20
Level 20
Posts: 10680
Joined: Mon Jun 12, 2017 8:39 pm

Re: Numeric Keypad Alt Codes

Post by MrEen »

You might be able to use AutoKey to get close to what you're used to. See the answer about half way down the page here: https://askubuntu.com/questions/31258/h ... le-em-dash

Instead of Alt-0150 you could use /0150 (or maybe even keep it the same, not sure)

User avatar
PeterRJG
Level 1
Level 1
Posts: 46
Joined: Mon Dec 14, 2009 8:00 am

Re: Numeric Keypad Alt Codes

Post by PeterRJG »

This is what I do, and it works for me. I've rebound CapsLock to the compose key, and use a cheat sheet, specifically this one:
https://fsymbols.com/keyboard/linux/compose/

I recommend CapsLock as it's a key with limited mainstream usage (does anyone you know type in all caps all the time?) and it won't interfere with UI or app-specific shortcuts if you bind Compose to Alt, Winkey (Super) or Ctrl like many do.

I'm not sure how Linux Mint does it (I use Arch) but I rebound the key using the setxkbmap command and added it to my .xinitrc. Of course, your mileage will vary as Linux Mint isn't started by xinit.

Anyhow, this is what works for me, and it works in the console, in LibreOffice, vim and wherever I need to use "special" characters.

User avatar
Dark Owl
Level 3
Level 3
Posts: 158
Joined: Sat May 02, 2020 7:43 am
Location: Brit

Re: Numeric Keypad Alt Codes

Post by Dark Owl »

It's a shame this forum doesn't have "likes" so I could express appreciation by "liking" posts.
Currently: Linux Mint 20 Cinnamon 64-bit 4.6.6, AMD Ryzen5 + Geforce GT 710
Previously: LM20β, LM18.2

erikjan
Level 1
Level 1
Posts: 37
Joined: Tue Apr 14, 2015 6:18 am

Re: Numeric Keypad Alt Codes

Post by erikjan »

Dear Dark Owl,

I cannot find a method to duplicate the Windows system to insert special charaters in Linux, I can only offer yo a workaround, for which you did not ask.

I recommend you install eurkey.deb via the standard installer. this gives you this keyboard:

https://eurkey.steffen.bruentjen.eu/

with the help of the altgr key you get amongs others characters like these:

æ å ä à á ë è é þ ÿ ü ü ù ú ö ø ò ó ï ì í

With the help of dead keys you get for instance:

â ê î ô û ǎ ě ǐ ǒ ǔ ŝ ĝ š ȟ č ā ē å ǐ

with a trick the minus and underscore key gives me with altgr : – and — .

In order to achieve this i had to change a line in

/usr/share/X11/xkb/symbols/eurkey.

I changed the line:

key <AE11> { [ minus, underscore, copyright, numerosign ] };

into:

key <AE11> { [ minus, underscore, endash, emdash ] };

I hope this will help you writing in Welsh.

Greetings

Erik Jan

Post Reply

Return to “Newbie Questions”