by hiAndrewQuinn · 1y ago · 0 comments
In particular the fact that Ctrl + anything letter-oriented makes something that is word-oriented instead, for example Ctrl + Left Arrow and Ctrl + Right Arrow let you skip word-by-word in documents, and Ctrl + Backspace lets you delete entire words at a time. This feels like it should be way more common knowledge than it is, like how copying and pasting any multiline document into your browser's URL bar will almost certainly format it into a sane single-line format.
Microsoft adopted the X/C/V shortcuts from the Macintosh for Windows 3.0 (replacing Command by Control; Alt was already used for invoking menus and the like), in addition to the existing CUA shortcuts (which are still supported and used today).
Of course in the Mac you have the same shortcut in every app because you use cmd+c/v
It really bugged me that by default you use ctrl+shift+c/v on Linux but only in the terminal.
Found a lovely feature in kitty term that does the right thing for ctrl+c depending on if you have text selection or not. Works great for me.
You have these same shortcuts in bash, zsh, the python repl, html form fields, etc. And anything that doesn't use gnu readline can be wrapped in rlwrap.
Note that copying and pasting is an exception. Otherwise, navigating words with shortcuts seems to fairly universally use these shortcuts.
And what Ctrl/CMD/Shift keys do together looks very random, no logic in it. Like, Ctrl+Left in Zsh scrolls the entire log to top, rather than move the cursor to the start of the line.
I use zsh, slack, Chromium, SublimeText and Zed on Mac.
What developer doesn't have these shortcuts memorized? It sounds like you're living in some bizarro world.
But the question is: what developers don't know about the standard keyboard shortcuts for copy and paste? Do they exist in any statistically significant numbers? ("There exists X" is not a very meaningful contribution if the Xs involved are something like 0.01% and are outnumbered by the number of programmers who write all their code on their mobile phone or whose version control strategy is to inscribe all their programs on a Tic Tac or a grain of rice or who think that Commodore 64-inspired homegrown operating systems are specially positioned to reveal the Word of God and offer protection against being pursued and persecuted by the CIA. Or are these some special breed of 9-to-5 darkmatter programmers who aren't going to show up on the radar, anyway?)
I get freaked out enough seeing devs that can't touch type. Now you're telling me there's a large number that also don't know the copy/paste shortcuts!?
I tend to use win+space, which instead toggles the input method you're using, as opposed to toggling how the pinyin input method interprets your input. But I had to learn about this secret special functionality of shift, because (some time ago; I don't know if it's still true) after switching your input method with world of warcraft running, the chat UI in the game would become nonresponsive.
After all, who ever heard of wanting to switch between different languages while using a chat interface?
Do you get freaked out the same way seeing professional drivers that don't race? I've never related the speed of typing to the quality of coding (maybe to the quantity, but not a reason for being freaked out).
In any domain where typing is the dominant activity, it would make sense to invest the small effort it takes to learn to touch type, and to learn basic keyboard shortcuts. You don’t have to reach 120 words per minute for the investment to pay off.
I used to be a one or two finger typist. Eventually, I took a touch typing class. For a long while it seemed like a waste of time. I could already type with one or two fingers at 40 words per minute. However, as I became proficient with touch typing, and as my touch typing speed approached my hunt and peck speed I started to realize what a powerful technique it was. I no longer needed to look at the keyboard, and my thoughts more easily flowed into the computer. This was a qualitative difference, not just about speed.
To continue the driving metaphor, IMO a driver who has had some basic driver education, and achieved some basic level of familiarity with the machine, will be a better driver, even if they never go faster than 40 miles an hour.
> as my touch typing speed approached my hunt and peck speed I started to realize what a powerful technique it was. I no longer needed to look at the keyboard
There's no connection between these things. I use two (sometimes three) fingers per hand. Do I need to look at the keyboard? Of course not.
I don't need to look at the keyboard because, when I would sneak downstairs to use the computer at night, I didn't want to turn on the lights.
Hey, that's me :)
Out of curiosity, why is this a yardstick for SW developers? I assumed the more valuable skill of the profession would be critical thinking and problem solving skills, not finger dexterity on pressing buttons without looking. That's why I didn't become a secretary or court stenographer.
I mean, a lot of doctors can't hand write for shit, but is that in anyway relevant to being a good doctor?
What about SW devs with handicaps or mobility issues?
Touch typing feels like a pretty niche hill to die on.
"I can touch type" == "I spend enough time writing things on the computer every day that I have invested in the fluidity and comfort of my own hands" == "I'm enough of a nerd to actually be good at my job".
But it's also worth it from an ergonomics standpoint. I learned to touch type over the space of a few weeks of practice, meant years ago, and it's the reason I can use a split ortho keyboard today, which is much nicer on my wrists than the alternatives. I can also keep a notebook between the two keyboard halves which is much nicer to scribble on than having it to the side somewhere.
That's exactly why I don't touch type.
Forcing my hands in the optimal "home-row" positioning for touch typing gives me wrist pain. Moving my hands towards my most comfortable position disables the ability to touch type.
>It's a signaling mechanism more than anything, as you can see from the other responses here.
Firstly, what if that type of signaling is flawed and might even be discriminatory if applied to screening people for an actual job, especially that SW devs conder themselves highly liberal and open minded to diversity.
Secondly, I also can't fathom how keeping my eyes focused on one screen continuously for long periods is healthy for them versus exercising them having to occasionally refocus towards the keyboard and back.
Thirdly, even if I would touch type, my job needs me to take my eyes of the "IDE screen" occasionally to look at other things like datasheets, PCBs, notes, etc. Then the amount of distractions in the office far outpace any supposed efficiency gains from not having to take my eyes off the screen, so there's no benefit to it anyway as the job has many other bottlenecks.
Reading the comments on this thread, makes me feel like I'm watching that scene from American Psycho where they're all in their bubble flaunting and judging each others' business card designs when they're all the same design. Glad I don't work with such judgmental individuals who scrutinize such pointless details like the way you type, as if their way is the only right way. Must be a nightmare.
>"I'm enough of a nerd to actually be good at my job".
Well then, I guess I'm lucky to be good at my engineering job without the way I type being an issue.
Programming isn't bottlenecked by how fast you can enter or type text, it is about focusing and thinking and then solving a problem. In other words, being able to enter text faster does not imply also being able to solve a problem faster.
I would even say that on the contrary, taking longer and reflecting on what you are typing more may perhaps result in a better quality solution of the problem being solved.
Our main output is typed code.
Yes, our most valuable skill is critical thinking. So I don’t want to waste time and thought on wondering where the “f” key is. If I’m thinking about typing, I’m not thinking about the problem.
Pretty sure my main output (at least by volume) is text files detailing things such as requirements, implementation strategies, and algorithmic tradeoffs.
I wouldn't link it to competency as a dev.
Plus, writing code is not the only kind of typing that I expect a developer to do. Even if I could accept that typing speed is not important for writing code, it's certainly important for writing documentation, good commit messages, communication with team mates and stakeholders, etc.
In other words, the only thing I think about is what to write, not how I do it.
It’s an invaluable skill not just for developers, but for anyone whose job requires frequent typing.
It is sort of nice to turning your laptop screen red and dim, and code on a dark porch at night (OLED screen required to get real darkness). Just you, the vim, and some fireflies. Your eyes will adjust to the darkness, and maybe you’ll see some animals that you don’t normally see.
Unless you are thinking slower than you are typing, you should invest in learning a basic and very easy skill
When I was 29, I got very bad RSI in my right wrist, and re-evaluated my whole computing life as a result: switched to dvorak, removed the mouse/touchpad in favor of keyboard-centric tools, and swapped to a trackball when the pointer was needed. I also learned to touch type.
Of all the changes I made, I think the one with the most lasting value was touch typing. I didn't want to learn it, but I just bit the bullet, and I'm glad I did. It makes doing everything else on the computer very fluid and comfortable. It sounds like the touch typing position doesn't work for you, but the core point is that being able to effortlessly interface with the machine while your eyes can do something else is empowering.
I bothered writing this because I spent decades both before and after learning to touch type, so I feel I have some perspective on how they compare.
In my college, if you couldn't type 40 WPM, you didn't graduate.
If instead you need to navigate somewhere you don't exactly know the location of, scanning and clicking is faster.
Then again, if you happen to know the exact location, going there by command is much faster
Skipping forward 3 words on the line, for example, could be ctrl+right ×3.
I can do that faster than I can move my hand from the keyboard to the mouse, let alone drag it around.
Making Caps Lock an additional Ctrl, and using Emacs keybindings (supported in nearly every IDE and on many command lines) makes one even more productive, because your hand doesn't have to travel all the way to where the arrow keys are. (A similar thing can be said about Vi keybindings.)
It is a strange phenomenon that many people do not wish to invest a few hours to make their lives easier later on.
As for Caps Lock, some of us have good reasons to have it mapped to something else that needs to be done frequently, e.g. switching keyboard layouts.
~/.bashrc:
stty intr ^x
~/.inputrc (at the end):
"\C-v": "" # Unbind Ctrl-V
~/.config/terminator/config (in case anyone happens to be using terminator):
[keybindings]
copy = <Control>C
paste = <Control>VDo you want to be productive on your own snowflake system, or employable?
Considering the hotkeys for xut and vaste, I think it's safe to say the mnemonic accounts for zero of the decision and the keyboard location accounts for all of it.
Win+c/win+v looks like a good compromise, using the Windows button for OS/DE commands, instead of application commands.
I find it extremely useful, GUI or not. Too bad it doesn't work half the time when it matters, especially on Windows.
It quickly morphed into ^C, but the first few months were interesting.
Coming from the VAX, it was ^T.
I miss Sun keyboards and their dedicated copy/paste keys.
Likewise, ALT just sends ESC assuming you're using the standard US keymap.
Didn't know that. I learned the other day that one can paste a password into the URL bar and drag it to a password field on the website that's annoyingly blocking paste (on Firefox at least). Probably a bad idea for security reasons (telemetry?). Just found it surprising. Also noticed many crappy sites that block paste will forget to block Ctrl + insert or Ctrl + Shift + v. I usually don't have this problem because the plugin of my password manager usually works..
You could probably drag it directly from the password manager to the password field, instead of using the URL bar as an intermediate (which indeed is a bad idea as whatever you enter there usually gets sent somewhere).
Ctrl-X, Ctrl-C and Ctrl-V isn’t even part of the IBM CUA specification. CUA places the Cut command at Shift-Del, Copy on Ctrl-Insert, and Paste on Shift-Insert.
I remember the lower left row on the US keyboard was always the first four operations from the nearly-ubiquitous Edit menu since day one.
Z - Undo
X - Cut
C - Copy
V - Paste
Certainly not the flagship apps from Apple. Can you remember an app that did this specifically? I seem to remember even early apps from Microsoft were fairly respectful of the early Mac HIGEarly apps frequently also had "Clear" in the Edit menu, which was like Cut except the cleared item didn't go into the system Clipboard
I guess I've also that useless "right click menu" keyboard button that's not even worth repurposing for anything due to the placement making it incredibly awkward to use. I'd be curious to know if anyone here actually uses the ctrl or alt keys that are located on the right.
For those unfamiliar with the compose key it is a superior input mechanism for rare characters that maps a mnemonic sequence to the character in question. you want an ø type compose o /
A tutorial if you do not have a compose key configured, I tend to run a minimal bare bones X11 setup, A more full featured environment may have it's own way of doing it.
map the compose key in ~/.xsession
xmodmap -e 'keysym Menu = Multi_key'
I also set up a ~/.XCompose mainly because it is fun to add your own include "%L" #include the compose file found in /usr/X11R6/share/X11/locale/<localemapping>/Compose
<Multi_key> <w> <e> <b> : "" # spiderweb
<Multi_key> <c> <c> <c> <p> : "\xe2\x98\xad" #symbol representing proletarian solidarity between agricultural and industrial workers
https://man.openbsd.org/ComposeI don't know if the compose system is found any where else but I regard it as one of the better things to come out of the X11 project. A little below select / middle click paste.
You must be located in the US, because the US is probably the only keyboard layout with a right Alt key. All the others have an AltGr key in that position.
I use the right Ctrl key in combination with the arrow, Backspace and Delete keys. Also with Return to enter the same content in multiple cells in Excel.
As for the right ctrl, by association with the AltGr, I usually map it as the Compose key.
I use the right control keys, I use Ctrl+Ins/Del, I use "Context menu" key, when it's available. And hey, I have almost a 30 years of muscle memory for them, so when some another idiot replaces the right Ctrl with F23 (which even can't be remapped by default AND pops up the stupidest menu for selecting what F23 should do) I really what to punch him in the face.
NB: as someone up in the thread mentions, right Ctrl is extremely useful for navigating in the text.
Although these days, chances are good that some things will not be accessible at all, because many devs these days just don't care to do even the basics like submitting dialogs on Enter properly. Historically, though, Windows at least was very thorough in making sure that everything GUI could be operated entirely from keyboard. Much of that is still there, just increasingly obscure - e.g. few people know that Alt+Space will open the same menu that you can get by clicking the window icon in the title bar (the one with Maximize, Minimize, Move, Size etc). Even fewer know that when you pick Move or Size from that menu, you can use the arrow keys to move and resize the window.
You mean CMD+C and CMD+V, right?