4 ms·
Coding and Keyboards (2023)
- zabzonk 2y agoi worked on a consultancy gig in Geneva CH, where they had both german and french keyboards - aaargh! i was slightly surprised they didn't have italian and romansh ones too! and my first encounter with unix back in the 1980s involved me with hacking termcap/terminfo files - eek! to everyone, do yourself a favour and use a US keyboard. and no, i am not a US national.
- rikafurude21 2y agoSame situation as this guy, muscle memory for the german keyboard has prevented me from ever really getting into vim, because I would have to learn the US layout first
- lawn 2y agoI used a Swedish layout for many years with Vim. I don't think you should put it off.
- rikafurude21 2y agoJust looked up your layout and it looks very similar to mine, how did you pull that off? wouldnt you have to remap alot of thigns?
- lawn 2y agoI didn't remap anything with the Swedish layout. Maybe it's less convenient than the US one for Vim but I honestly can't remember how large the difference was.
- bjoli 2y agoI bind a bunch of symbols under altgr (right alt) and the qwerty+asdf keys. Highly recommended.
- eviks 2y ago> everyone else now has to live with this decision. Unless you change key bindings, which isn't that hard for just a few cursor keys? Though the criticism of bad defaults that persist for many years is totally appropriate
- CoBE10 2y agoAs a Serbian keyboard user, I really dislike these keys: \ [] {} |. They always mess up my typing flow. The layout seems to prioritize punctuation like : , ; and - over the symbols needed for programming and markup, making them easier to reach compared to an English keyboard. It’s great for writing regular text, but when it comes to using LaTeX, it’s a pain since typing \ [] {} | feels like doing gymnastics with my fingers.
- qsort 2y agoMost software developers I know switch to the US layout for coding precisely for this reason. Square brackets are also usually much harder to reach in European layouts, while normally they have a dedicated key. Personally I use the US layout on all my keyboards all the time, even if it doesn't match the physical keys -- I just can't go back at this point.
- lawn 2y agoAn interesting tidbit is that in my previous job practically everyone used Emacs and most people converted over to the US layout for coding instead of the Swedish one. So now I'm fluent in the Swedish, English and later my own layout[0]. A little bit of a waste to be honest, although I'm much more content now. [0]: https://www.jonashietala.se/blog/2023/11/02/i_designed_my_own_keyboard_layout_was_it_worth_it/ https://www.jonashietala.se/blog/2023/11/02/i_designed_my_ow...
- calini 2y agoI've been interchangeably using a UK-ISO and a US-ANSI keyboard for some time now. The only physical differences are: - Short Left Shift and extra 1x1 key right of it, in ISO - Enter key being 2x1 in ANSI and a weird tall shape in ISO I do prefer the ANSI enter key nowadays, but I use ISO because of availability in Europe. I could move to ANSI but my work laptop would still be ISO for example. For keyboard layouts, I use 'Romanian - Programmers' (Which is US English + the extra Romanian diacritics are made with a key combo, AltGr + A = Ă, AltGr + S = Ș, etc). I had made the change as using the Romanian - Standard layout would've made crazy difficult to type special characters: []{};'\:"|,./<>?. What I would like to see discussed is how a true successor to QUERTY would look like, one that's not dependent on physical typewriter arms not getting stuck together, possibly an ortholinear.
- makeitdouble 2y agoTo note, it feels a lot easier nowadays to remap keys, which helps make the best of any layout we've grown used to. Carabiner on macos was great until kext got the stinky eye, but I'd assume the situation could improve again. PowerTools on Windows is excelent for most cases, and AHK covers the rest. Unixes have always been stellar on that front. At this point anyone should try at least once to remap some keys to make one's life easier. On this front of the weakness of the US ANSI layout is the lower number of keys, where other layouts (the JIS one for instance, or the british internaltional on mac) give more latitude for extra modifier keys and additional shortcuts.
- sandreas 2y agoI would love to see more Keyboards providing firmware based remapping options... No need for extra drivers or hacky solutions... Just works everywhere. Best case scenario: Use a shortcut to activate mapping profiles to store different mappings in the same keyboard - press Ctrl+alt+super+1: enable profile 1
- lawn 2y agoQuite a few keyboards supports the QMK firmware. If that's what you want there are several options at this point.
- sandreas 2y agoI would like to See: - More open keyboard firmware - more vendors supporting it - An Option for (programmable) key mapping within - Support for at least 5 mapping profiles But this is pretty unlikely to happen...
- makeitdouble 2y agoYes, that's definitely something that needs to be more common and standardized (looking at you, Logitech) On the "works everywhere", it's a weird beast. Programmable keyboards will work on any machine without any configuration, while software remapping will work on any keyboard, even the cheapest IR dongle keyboard you'll buy in a pinch during a trip. IMO it comes down to which one you switch more often, the machine or the keyboard.
- bee_rider 2y agoSomething I don’t understand: > People constantly search for simple ways to facilitate something, and when you need a character that is not in the alphabet, Europeans will most likely choose < and >, while Americans may choose { and }. What’s the difference or cultural context here? I see them used very rarely in written text. The only context I see them commonly used is math, they are used around sets pretty often, for whatever reason. Or their giant cousins are used to denote different cases. I have no idea why we have these curly bracket keys. Really I think they are just programming keys for the most part… I’m glad nobody thought to go through and localize the US keyboard to only include punctuation we use! I wish we’d localized worse, let’s get some Greek letters, they can replace the numpad.
- scubbo 2y ago> This then suddenly explained why so much HTML code is written IN UPPERCASE LETTERS: On a US-ANSI keyboard, you can circumvent the pain of having to use angle brackets by simply enabling caps lock and then typing everything without pressing shift at all. ...huh? Caps Lock has not affected non-letter keys on any keyboard I've ever used, in the UK or the US.
- deleted 2y ago[deleted]
- rlkf 2y agoI took a note from the French keyboard layout and placed all the common programming symbols on the numbers row, and the numbers themselves on shift, since the amount of symbols usually dwarfs the amount of hard-coded number in source code. (If I enter numbers in a spreadsheet, I use the keypad on the right side). Combining this with a regular Dvorak layout for the letters, I get a Programmer Dvorak layout that lets me touch-type code as easily as regular text! (And yes, I can also use Neovim with Dvorak)
- unwind 2y agoInteresting because keyboards and programming are core interests of mine (shocking, on HN). I am skeptical about two of the main claims/conclusions, though: - I don't think enabling caps lock makes the comma and period keys produce < and > without shift on a US keyboard, does it? It's not a "shift lock" after all. - I think HTML is an application/specialization of SGML, which came from GML that is much older, and from IBM in the US.
- kruador 2y agoIf you look at Tim Berners-Lee's original NeXT Cube that he developed WorldWideWeb on, you can see that it has a US keyboard layout. https://artsandculture.google.com/asset/original-next-computer-used-by-sir-tim-berners-lee-to-design-the-world-wide-web-next https://artsandculture.google.com/asset/original-next-comput... There's obviously a caveat there that the keyboard could have been replaced - but based on the colour of the plastics it would certainly be a similar age. The keyboard has AlphaLock rather than Caps Lock. I can't find a manual saying exactly what it did! You're right that the Caps Lock key on PC and Mac keyboards only capitalises the alphabetic keys without affecting the symbolic or numeric characters. Some international layouts may still offer a Shift Lock?
- tracker1 2y agoHaving grown up with US keyboards it's somewhat hard to relate to the difficulties of certain patterns. Then again, I've seen enough keyboards that break said patterns that it's frustrating to say the last. My current favorite is the Unicomp 103 let US ANSI layout. I started with whatever came with a PC XT (model K iirc), then about a decade with a model M keyboard. I spent about a decade on about 2 a year that I hated before discovering Unicomp existed. I also got into other real switch keyboards as a result. I'm generally fine with Cherry MX Brown. On layout, I can't stand the Fn key in the corner. And I didn't like when the arrow keys are weirdly integrated on the right. I favor Ctrl on the left and shift on the right. While I haven't used other language layouts, I find that even the differences with Mac key bindings throws me off a lot.
- wvh 2y agoI've lived and worked in multiple countries and international environments. I always get a US/EU (Intl) ANSI, also used as the modern Dutch keyboard layout, configured to get umlauts and accents. I used to drag around my own X keyboard definition for years, but the last eight years or so I settled for the included "eu (EurKEY)" layout, which was really close to my own anyway. Check that out if you occasionally have to manoeuver Western and Northern European languages, because it gives you more without taking away the regular QWERTY stuff you're used to. I speak about six or seven languages, and I can get around with just this one layout, which makes things so much easier. Get me a regular US/EU ANSI keyboard or laptop, or get somebody else to do the job, really. This is so basic in dev/sec/ops that I'm not willing to faff around.
- garyclarke27 2y agoI have an old steelseries gaming keyboard that has 22 macro keys that can easily be programmed, is so useful for coding and excel shortcuts and copy paste etc. Extremely annoying that the new steelseries keyboards and other vendors have far fewer macro keys. In fact I can't find any keyboard with the same bank of 10 keys on the left (like another number pad) and 12 across the top and I have searched extensively.
- CookiesOnMyDesk 2y agoIf you get a keyboard that is programmable with QMK [0] and/or VIA [1] you can just program any key, or mod+key, to be a macro - and you can even record them on the fly [2]. [0] https://docs.qmk.fm https://docs.qmk.fm [1] https://www.caniusevia.com/ https://www.caniusevia.com/ [2] https://docs.qmk.fm/features/dynamic_macros https://docs.qmk.fm/features/dynamic_macros , https://usevia.app/ https://usevia.app/