Similar thing. To avoid my fingers fighting each other when pressing cut copy paste in Macbook, I almost bought those 20-key left hand gaming keyboard so that I can do them in a single keystroke.
You can remap keys on any keyboard layout, no need to get a Japanese keyboard.
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.
Now that's a blast from the past in typing class. I remember hearing people complaining about this or rather using it as a horror story about the class. Of course by the point in the class you use these, you've passed the point of being expected to know where the keys are and it is pretty much an advanced part of the class.
A not insignificant number of keyboard enthusiasts prefer to use blank keycaps. It's often merely an aesthetic choice, but those who like to tinker with custom layouts also favor them because that lets them skip shuffling keycaps around following a layout change.
Back in the dark ages of having to work in an office with shared space in a cubicle farm, it wasn't unheard of where people would swap their keyboards with others because theirs was not working correctly rather than going through IT to get it looked at--possibly also knowing IT might just shrug their useless shoulders at it. I'm guessing a keyboard with blank keys would prevent that.
The last stage of mastery is when you drop the need to prove to the world that you don't need to shuffle keycaps by just keeping the existing ones rather than blanking them out.
You know, it occurs to me that musical instruments have blank actuators (keys, fingerboards, valves, ...); yet that alone doesn't prevent music learners from staring at their hands while playing, and that's a habit that can persist for years or decades even.
People learning typing on computers should be encouraged to keep their eyes where their typing appears on the screen.
This is the main reason why I just use the US ANSI layout in germany, together with KbdKaz on Windows for umlauts and a lot of other extra characters and accennts: https://www.omega-com.pl/kbdkaz.htm
For a while the pile of crap that is Windows 10 got very drunk about keyboard layouts (maybe in combination with connecting to a remote desktop to a computer with a different set of layouts). Being in Switzerland with Swiss German, French and Italian layouts, and having just German and English on the client computer, it would lie to me and claim the layout is English when it's German, etc, etc, and the control panel would even lose layouts...
A cross-platform alternative is to use the EurKey https://eurkey.steffen.bruentjen.eu/layout.html allowing you to have the US keyboard layout by default while using modifier keys for various diacritics common in European languages with Latin script.
Seeing as it wasn't mentioned, there's a Ukelele[0] app for making keyboard layouts for macOS. After installing a layout, switching is as easy as tapping 'fn' by itself or using the keyboard menu icon. For Windows there's MS Keyboard Layout Creator[1].
Indeed - I recommend a split keyboard with two split spacebars on both sides. The Ergodox or it's FOSS equivalents are really nice once you program in some useful things and there are many very good keymaps for plug-and-play.
I have '-' and '_' right there on left and right thumb, and () {} [] can all be done on main row + thumb modifier.
Backspace, delete, space, and enter are my 4 "spacebars".
So no, there aren't very many annoying things I have to type. It just strikes me as obvious that most of us would have our own programmable keyboards, given the stereotypical HN'er, but it seems less known / adopted.
I picked up the (back, del) (enter space) thumbs layout from Kinesis, that feature alone has saved me years of strain, id wager. The shape took a bit of time to get used to but I was back at my average wpm speeds in a couple of weeks. Not as much of a learning curve as Ergodox with its layers but the curve and ortholinear layout take a bit of adapting to, though that's true of the Ergodox too.
I kind of wish split keyboards were standard, instead of the default mode being all squeezed into the same 38cm wide form factor. The MS Natural keyboard was a step in that direction, split keyboard with a JUMBO space bar, but I wouldn't nominate it for the new standard..
While the kinesis doesn't have layers like Ergodox, it does have macros and you can remap keys via the hardware of the keyboard itself. I've been using an Ergodox for a few years now and got used to the layers but found the switches needed replacing a lot sooner (maybe I should have gone with a different set) and found the firmware update process for remapping to be annoying and tedious. Ergodox is more powerful in the abstract, though.
If you take control over your keymap and break out of the idea that the keycaps have to say what the key actually does, the problem is rarely insufficient keys on the keyboard to do what you want, even before you start mucking around with layers or other fancy things. A key that you want to have at hand, but only occasionally, is fine on a SHIFT-CTRL or CTRL-ALT or CTL-Win setup and very few things are default bound to such shortcuts in general.
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 can't remember the last time I used a German program. Ah right, CLISP. That's the code base thanks to which I remember the German word for memory management: speicherverwaltung.
"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.
The downsides aren't unique to Japanese keyboards. On Danish keyboard " requires the use of the shift key, same for = and the \ in on the 7 keys, along with /, requiring you to hit option + shift + 7 (on a mac keyboard, I believe it's Alt + shift + < on none Apple keyboards).
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.
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.
Thanks for taking the time to clarify. All the things you point out were actually clear to me (I was just kidding after all) but I think it doesn't hurt to give some good examples to illustrate the actual underlying issue.
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).
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.
Maybe it's because I took an actual typing class way back in the dark days of actual clackity-clack type writers, but I don't get the dislike of shift keys. Are these people that learned to type from only playing games or other non-formalized learning to type? Kudos for you learning regardless of the method, I'm just looking at why I don't have the same aversion to the shift keys. I even use the "proper" shift key meaning I use the left shift when using a right hand key and vice-versa.
I never learned to type "properly" and I also don't really care or think about modifier keys. I suspect it's one of those things - like coffee snobs searching for the perfect pourover technique, or steak snobs perfecting their reverse sear - wherein people take a hobby, passion, or profession of theirs and feel a need to hyperoptimize it.
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.)
Entirely anecdotal point here, but I learned to type in 6th grade, at a time when manual typewriters where more prevalent than computer keyboards. I've never experienced RSI. My hands only get tired after about 10 hours of work and after a full night of sleep they're entirely fine.
Probably the same reason I love keyboards with "cherry blue" type switches in them.
This was my thinking as well that the "formal" typing instruction really helps more than people appreciate. Having a teacher come by and scold you for having lazy typing posture definitely sets a good habit. At least it wasn't as bad as the meme of a nun and a her ruler, but it was the next best thing without physical contact.
I wonder how much of this is the formal techniques like opposite-shift use and good hand/wrist posture, vs how much was from muscle tone developed from having to really push on a manual key set. Even the automatics had a bit of give to them compared to the typical computer keyboard, and now we have nearly as many keyboards on screen displays as there are physical keyboards (I'm estimating), where you may not even have a haptic vibration response on key down.
This isn't a "get off my mechanical keys" rant, this is a "should we be making exercise typewriters?" plea.
That description of effort is better reserved for something like switching to dvorak. I slowly became a much better qwerty typist by spending a few minutes of conscious effort to type correctly whenever I remembered to, which was like once or twice a week, and after a few years realized how pleased I was that I was getting my ideas onto the screen easier and faster.
Later on I learned dvorak, got kinda ok, realized I would never escape all the mental switches back to qwerty and gave up. Even that was still far and away easier than any other physical dexterity training (like jugging or guitar) because there was a total of ~1-2 hours of deliberate technique practice and the rest was just slowly getting better during normal execution.
That proper shift technique never clicked with me. I developed a technique whereby I use only the left pinky for shift, and only the right thumb for the spacebar. Thus, for text not requiring shifting, I'm using nine fingers including the right thumb. Yet, I can touch type just about as fast if I lose the left pinky by keeping it planted on the left shift key! FOR INSTANCE, I TYPED THIS SENTENCE WITHOUT LIFTING MY PINKY FROM THE SHIFT KEY.
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.
10% of the remaining advantage of Scheme today is not needing to use the Shift key to type identifiers on US keyboards. Instead, you use minus rather than underscore, and there's no camel-case, and mostly no all-caps (except for syntax transformer pattern variables, IMHO).
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.)
One of my favorite keyboard layout tweaks is being able to tap left/right shift for open/close parens. How well it works depends on the keyboard but especially on split keyboards it can be very nice.
I guess you're being downvoted because of how you said it, but you're not wrong. I have a Japanese keyboard too, albeit not a Mac one, and the underscore needs shift (without shift, it's backslash, which means that yes, I don't need to use M-¥). Caps lock is also under tab, and Control on the bottom left.
I briefly flirted with a Japanese keyboard just to get the extra keys that they have (next to the space bar which is much smaller) I then remapped those keys to other more useful commands.
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.
I always buy Macbooks with JIS layout, not because underscores are convenient to type. It's convenient to push the ?? button to start writing in Japanese then ?? when finished. On an ASCII keyboard, Mac OS requires either C-<RET> or pushing the Fn key, both of which waste an entire second to display a modal, then another second to actually switch keyboard layout.
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.
I used to do this, and my company used to let me pick the layout of my laptop – but at some point they stopped, and since covid there’s now hotdesking, so I begrudgingly readjusted to a physical ANSI layout, mapped to QWERTZ.
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 :)
Do you actually have to wait for the modal to show up? I was under the impression you could just press ctrl + shift and not wait for the modal and it would still switch layouts, but I could be misremembering.
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.
Food for thought. When I was making my own custom keyboard layout I resisted the additional rabbit hole of shuffling punctuation. The only change I did make was to put ',' above right-hand pinky (shifted is ':' and home-row pinky being a letter). I decided I'm not going to use semi-colon terminated programming languages anymore so it's fine to be down with the '<' key.
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.
I used one for 10-15 years, and the extra column of characters definitely were bad for RSI. My right ring finger’s tendon was impacted the most. The extra reach to arrows, the enter key, etc. were too much for me. I went back to a US layout and don’t have issues now.
> less drastic than switching to something like Dvorak
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.
Sounds like a questionable tradeoff to me. I just want underscore remapped to shift-space. It’d be easy to type because they’re both big keys. And underscore is a variation of a space anyway. It’s like an uppercase space
For multiple lexies into a single identifier, I love middle dot (·), which is actually works in most modern languages out of the box. Example `some·variable`. Try it in your favorite languages and let me now how it goes.
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.
In Clojure '-' is not a special symbol, so it's used as a word separator in function names, like 'get-in'. That's possible because '-' is not an operator, but is a function with a 1-symbol name.
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.
An ordinary identifier is composed of a leading alphabetic character which may be followed by one or more alphanumeric characters. It may also contain isolated, embedded apostrophes ' and/or hyphens -, provided that the next character is each time alphabetic.
Thanks for the link and the excerpt. Just out of curiosity, did the capitalized "NOT" was there because my above message was interpreted as a guess that `2-5-7` could serve as an identifier in Raku? That was not my belief nor what I tried to expose, to be clear on that point.
The best part of setting things up like that (especially with `-` having any arity) is that there's no ambiguity in the grammar between -/1 (negation) and -/2 (subtraction).
reply