News for hackers. Stuff that matters.
Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @01:09AM (#30424531)
CapsLock is extremely useful in programming, where CONSTANT_NAME is the most common convention for names of constants.
Re:I have no capslock and I must scream by masklinn on Tuesday February 22, 2022 @01:31AM (#30424645)
Writing out constant names is a minor and rare event (even more so with any editor featuring autocompletion). This does not come close to “useful”, let alone extremely so.

The value of capslock is that it provides an essentially blank key which can be remapped to something useful e.g. Ctrl, Esc, Meta, …

Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @03:37AM (#30425419)
A good keyboard doesn't really need re-mapping, as the ctrl, esc and meta/alt keys are already readily available. You could argue for mapping caps lock to Super or Hyper if you're an emacs user maybe, but I for one never felt the need.

Exactly as the article mentions, caps lock is a nice to have, though rare, key. Removing or remapping it will complicate your typing in those scenarios for sure. if you find a better use for that space where it simplifies other more common scenarios, great. But just removing it would be idiotic.

Re:I have no capslock and I must scream by masklinn on Tuesday February 22, 2022 @04:07AM (#30425616)
> A good keyboard doesn't really need re-mapping, as the ctrl, esc and meta/alt keys are already readily available.

They’re not, unless by “good keyboard” you mean “custom layout”. On all the keyboards I’ve ever known, the almost entirely useless capslock takes one of the more valuable places on the keyboard just left of the home row. It’s the modifier key which requires the least movement by far, yet with a native function which is almost entirely worthless.

I’d like to see your hypothetical keyboard where control (to say nothing of esc) is anywhere near as easy to reach, despite both being used significantly more than caps, and caps being trivially and fully dispensable with unless your days are spent writing SQL with all keywords in all caps.

> You could argue for mapping caps lock to Super or Hyper if you're an emacs user maybe

No, you really could not, unless you’re part of the minority which flies with fully custom keybindings. But even then control is such a central modifier of emacs that making it more accessible and require less contorsion tends to yield the highest bang for your buck.

You could always remap the old control to super or hyper instead of having two control keys I guess.

Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @09:57AM (#30428678)
Personally I use the Microsoft Sculpt keyboard [0], and holding Ctrl down is as easy or easier than caps lock, particularly for Emacs C-x or C-c, where I can use my right pinky on C-. Also true for Ctrl+z, a pretty common combination in most modern UIs.

It's true that Esc is nowhere near as easy to reach, so if I used vim I'm sure I'd like to switch them (alt/meta is also easy to reach for me, so I never felt the need to use Esc for Meta in Emacs; and having two Alt keys anyway makes it better).

[0] https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/... (using just this picture of the layout so this doesn't come off as some advertisement)

Re:I have no capslock and I must scream by rgoulter on Tuesday February 22, 2022 @05:10AM (#30426058)
> I’d like to see your hypothetical keyboard where control (to say nothing of esc) is anywhere near as easy to reach

With multi-function keys (as supported by e.g. QMK-powered keyboards, or software like kmonad) allows adding multiple functions to a key.

e.g. "tap-hold": "tap CapsLock key sends 'Escape', hold CapsLock key sends 'Ctrl'" would be useful for someone who uses Vim and/or Emacs.

Taking 'tap-hold' a bit further, you can try putting the modifiers (which are only useful when held) under the home row keys: putting Alt, Gui, Ctrl, Shift underneath ASDF, (and reverse: Shift, Ctrl, Gui, Alt underneath JKL;). -- So called "home row modifiers".

The advantage is not needing to move the hand, and not needing to use the weaker pinky finger. Although, it can take some getting used to.

Re:I have no capslock and I must scream by masklinn on Tuesday February 22, 2022 @05:31AM (#30426177)
Sure, but that’s really a more advanced version of “remap capslock to something useful”, it’s not what GP claimed.
Re:I have no capslock and I must scream by electroly on Tuesday February 22, 2022 @01:46AM (#30424715)
Holding down shift is not really a problem for constant names since you need it for the underscores anyway. You can type CONSTANT_NAME without lifting the shift key but with caps lock you still need to use shift anyway.
Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @03:26AM (#30425341)
You can't "hold down" shift when writing CONSTANT_NAME if you're doing any kind of touch typing. You constantly have to switch between pressing left shift or right shift, so basically you're writing 13 key-combinations. With caps lock, you only need to use a key combination once (for _), instead of 13 times without.
Re:I have no capslock and I must scream by foxfluff on Tuesday February 22, 2022 @05:34AM (#30426198)
Any kind of touch typing allows ring finger to substitute for pinky when the latter is shift-locked.
Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @09:58AM (#30428694)
Sure, but it's definitely harder than using CapsLock.
Re:I have no capslock and I must scream by electroly on Tuesday February 22, 2022 @10:38AM (#30429229)
Any kind of touch typing? No, I don't agree with that. I can type 140+ wpm and don't look at the keyboard, and I can hold down shift while typing CONSTANT_NAME. Pinky on shift, remaining 9 fingers type CONSTANT_NAME. The pinky would not be involved with this particular constant even if it were free. The kind of touch typing you learned in school has a problem with this, maybe.
Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @11:14AM (#30429654)
A is normally typed using the left pinky, so holding left shift will force you to use the left ring finger for it.

To be fair, on some keyboards, including the one I use, it's easy to reach both the right and left shift keys, so it's easy to alternate shift keys as needed to avoid using other fingers or moving your hand from the home row.

Re:I have no capslock and I must scream by electroly on Tuesday February 22, 2022 @11:16AM (#30429679)
I guess it's important to note that I would use the right shift for this. I have the ability to choose on-the-fly rather than be forced into one or the other by a typing method that I learned in school. I could still do it with the left shift but it's not the one I would choose for this.

It's probably fairly obvious what I think about the taught-at-school touch typing method. It's a decent middle-of-the-road option that's intended to be easy to teach and to work for most people in most situations; that's all.

Re:I have no capslock and I must scream by wizardofdos on Tuesday February 22, 2022 @08:55AM (#30427910)
As common as it is wrong.

Why is the constant screaming at me? Why is the fact that it's a constant important enough to be encoded in the styling of the letters, but not important enough to be encoded in the name. Why isn't the IDE or the compiler keeping track of the constantness of the variable and reminding me to not do the wrong thing? If they can and are, why am I not trusting them? And if they can't, why am I writing in a language that doesn't even have JavaScript levels of a type system?

Re:I have no capslock and I must scream by bdowling on Tuesday February 22, 2022 @02:12AM (#30424871)
Or in vim you type `constant_name`, followed by `Esc gUb`. ('g' go, 'U' uppercase, 'b' back one word.)
Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @03:34AM (#30425389)
That's still 3 extra key strokes, including a key combination, to go from writing the constant name back to writing the next word (with caps lock: caps lock, constant_name, caps lock; without caps lock: constant_name, Esc, g, shift+u, b, i - you also need w, i to get back to the end of CONSTANT_NAME and keep typing). Also, switching mode, applying a command, then switching mode again versus pressing a key for uppercase and pressing it again for lowercase is a much bigger distraction from my point of view (emacs user) but maybe you actually get used to that using vim.
Re:I have no capslock and I must scream by rgoulter on Tuesday February 22, 2022 @05:03AM (#30425996)
> versus pressing a key for uppercase and pressing it again for lowercase

FWIW, "Caps Lock" is modal.

e.g. the Wikipedia page lists "Caps Lock" as a common example of mode errors. https://en.wikipedia.org/wiki/Mode_(user_interface)#Mode_err...

(No vim = not worrying about insert/normal mode; no capslock = no worrying about if tapping 'a' gives 'A' or 'a').

Re:I have no capslock and I must scream by tsimionescu on Tuesday February 22, 2022 @11:15AM (#30429677)
True, but at least to me switching between CAPS MODE and lowercase mode is less distracting than switching between editing and command/visual modes.