Many years ago, I was working in a German lab and their keyboard layout is really impractical for programming in C-like languages because all commonly used symbols are really awkward to type. I wasn't well-versed in XFree86 then (or today for that matter) but I remember I could solve the problem by simply changing they map that Emacs uses to map keyboard keys to input events. In other words, I was still using a German keyboard but when I typed "blindly", it behaved like a US keyboard. I even had some keys to behave context-sensitively, i.e., the same key stroke would produce different symbols depending on where the cursor was positioned in a buffer. That was actually tremendously useful.
So, if you wanted some other key to give you and underscore without having to hold down Shift (which I don't get why this is a problem in the first place, it's not like we don't have auto-complete in our IDEs), there's multiple ways you could achieve it.
[0] https://software.sil.org/ukelele/
[1] https://www.microsoft.com/en-us/download/details.aspx?id=102...
If it's only a couple of such keys, it is generally not too difficult to use someone else's keyboard if you need to; slightly annoying but you will recover how to do whatever it is you're doing right now reasonably quickly.
I recently switched to this 64-key keyboard: https://mistelkeyboard.com/products/0a26d32ac1e3b1d2af2896e0... I've got a setup where I put one half on each armrest. After a brief adjustment, it's fine, I've got everything I need at hand, and I use the keyboard like crazy; I have not obsessed over setting up a no-mouse setup, but I can hit the mouse single digit numbers of times per hour pretty easily. There's plenty of keys.
Not sure if that's your reference or not???
Fun fact: amayon.de redirects to amazon.de
"Yeah but" now you're mucking around with software. It's not simply plug-and-play.
From its first paragraph, this 2012 article acknowledges that it was sparked by a HN discussion¹ about another article² and that the HN discussion already covered the remapping solutions you are again proposing 12 years later.
This article offers the Japanese keyboard idea as an alternative to remapping.
---
I believe this is an artifact of JIS_X0201, which is, to my knowledge, the first major Japanese 8-bit encoding and mostly 7-bit ASCII + Katakana (that character set you see in old Japanese video games) and some Japan-specific symbols filling the other half of the 8-bit space.
In it, byte 0x23 was changed from "\" to "¥".
The history is fascinating:
> The 1964 ISO draft reserved the positions 0x24 and 0x5c for first and second currency symbols to be assigned by each country, but it was considered too dangerous in international communications to use currency symbols that could be localized. The ISO committee had two options that to use a generic currency symbol (¤) or to give the dollar ($) and pound (£) signs permanent assignments. It was agreed that the dollar sign was assigned to position 0x24 and the pound sign was to position 0x23. The latter was not required in countries that did not need the pound sign. The JIS committee decided to put the yen sign (¥) in 0x5c (one of the national use positions).
https://en.wikipedia.org/wiki/JIS_X_0201
It's legacy lived on in Shift JIS which Window's extended and resulted in Japanese Windows computers having file paths like "C:¥Users¥MyName" and escape sequences like "¥n"
All this to say, my respect for Japanese devs who work with encoding is top-tier.
Back when the Internet became aware of typing injuries (RSI), folk wisdom was that one of the causes was the multiple simultaneous key presses, because of how people often contorted their hands to do it.
I made various changes, and now, decades later, I can type all day and night, without discomfort (much to the chagrin of HN).
(Kudos to people who limit yourself to one modifier at a time, and who use the alternate hand for it. It's still more repetitive motion, but at least you're not going against the folk wisdom about contorting hands.)
My technique is efficient in circumstances where I have to type several upper case letters in a row, which happens quite regularly in C programming. Using "proper" shifting for an identifier like UINT_MAX is nonstarter, and using CapsLock before and after is likewise inefficient.
I think the double Shift key design and the related proper technique is a holdover from mechanical typewriters. You need to put a good amount of strength into the shift. It's not as easy to type with your left hand while its pinky is anchored to the Shift key.
https://news.ycombinator.com/item?id=3976669#3981000
(Don't click, it's not worth reading. Pretty much like this comment, too, sorry.)
I will admit, JIS layout makes writing Clojure a bit easier, though it also makes quoting tedious. Escaping is even more tedious. Push M-¥ is one option. Another option is to configure Mac OS to output backslash, but then you can't input ¥.
When coding with an ASCII keyboard, I frequently make typos due to muscle memory. If you work in the US, that is another major disadvantage. Your work computers will have ASCII keyboards, not JIS keyboards.
Regarding muscle memory: That hasn’t been a problem for me as much as some shortcuts just not working.
Some applications seem to insist on controlling these by key codes, but display them as characters mapped to a US ANSI layout, giving me no way to actually configure the one I want for those keys that are physically different between ANSI and ISO.
Makes it very hard for colleagues to “quickly” type something on my computer if they can’t be bothered explaining what they want me to type in pair programming :)
However, Scheme and other Lisps have the problem of parentheses being a shifted character on most US keyboards.
For Scheme, my Emacs tweaks included letting you type the square brackets (unshifted on US keyboard) to get parentheses. (Or you'd get the correctly matching closing character, if the close-square-bracket key you pressed would match an open-square-bracket.)
The file is at https://www-cs-faculty.stanford.edu/~knuth/programs/DonKeys...., linked from https://www-cs-faculty.stanford.edu/~knuth/programs.html
Apple messes with the standard keyboard of all layouts.
For elements that have to bee ditched in a destructuring operation, like `target, _ = some·generator()`, it’s possible to use a word that explicit this discard. One short one term for that is "lee", as in "Basest part, ‘dregs’, ‘refuse’[1]."
I wasn’t aware that many people disliked so much underscore and other YOLO approaches to morphe agglutination. I always felt sad that we had to endure this ridiculous typographical masochism that plague the whole industry. But going against a widespread habit, as absurd and sore could it be, is generally its own road to some form flagellation.
[1] https://www.oed.com/dictionary/lee_n2?tab=meaning_and_use#39...
Clojure I guess is taking that from its LISP legacy, where it’s not an issue as you don’t have infix notation.
Raku on the other hand, took the decision on the road starting from Perl. If I recall correctly, Raku does let you use infixed dashes as minus into agglutinated numeric literals and operators sequences, like `2-5-7`, but your need spaces to use it as a substraction operator when an identifier is involved like `bare-price - gift-voucher`.
That said I never used Raku nor Clojure (or any Lisp), there is just no job opportunity that ever reached me with these kind of non-mainstream programming language.
No surprise, as Ruby was developed by a Japanese. [0]
[0]: https://en.wikipedia.org/wiki/Ruby_(programming_language)
Yes, I have underscore on the main layer on a 32-key keyboard. It's just that common in my usage.
The Japanese keyboard in the article does have { printed on a key, it's Option + Shift + 8 and the Danish Mac keyboard, and the key isn't labels with {, } is on the 9.
Just kidding, I know that some people have a hard time typing them, especially when your day job consists of doing exactly that for eight hours.
Lets say your keyboard requires modifier keys for a specific symbol, but your program treats that input differently depending on whether modifier keys are held or not. Or another bad one, lets say your keyboard requires multiple strokes for a specific symbol, for example backticks, and your language uses backticks as quotes...
So many language and programs designed with strange symbols and keyboard modifiers are close to unusable in other keyboard layouts.
I then discovered VIA/QMK keyboards and now I have keycaps I can't even see on my vertically mounted split-key keyboard and more programmability than I know what to do with. But in 2012, a Japanese Keyboard was much cheaper than a Kinesis and to me the only option.
Underscores are stupid? Get a Japanese keyboard - https://news.ycombinator.com/item?id=3980866 - May 2012 (40 comments)
Underscores are stupid - https://news.ycombinator.com/item?id=3976669 - May 2012 (127 comments)
Still no regrets. With software being such an important thing to my life, easy snake_case & kebab-case a big reason I haven’t been interested in switching to another layout.
On my keyboard, the symbol for underscore looks just the same as the symbol for minus. No idea which is underscore and which is minus.
I think underscores are pretty painless, but maybe it's just that my hands being like Trumps tiny hands make it less painful? I never liked the idea of a short space bar, but thinking about it now with the comment of having a couple useful buttons does sound kinda nice.