News for hackers. Stuff that matters.
Re:Renaming files with mv without typing the name two times by arkaic on Monday April 13, 2020 @09:19PM (#22861902)
Also, typing braces are annoying. To think about it from a UX perspective, this solution on gist, judging by the video, is perfect.
Re:Renaming files with mv without typing the name two times by qplex on Monday April 13, 2020 @09:45PM (#22862020)
Let me just say that typing {}[] is super painful on many international variants of QWERTY. Typically you need to press a modifier for both (Alt Gr).

https://en.wikipedia.org/wiki/QWERTY#International_variants

Re:Renaming files with mv without typing the name two times by izolate on Monday April 13, 2020 @11:00PM (#22862359)
Which is why if you're a programmer, you're doing yourself a disservice by not using a keyboard with a US layout.
Re:Renaming files with mv without typing the name two times by llarsson on Monday April 13, 2020 @11:49PM (#22862588)
Full agreement from me. My ergonomics and efficiency both improved immensely when I switched from my native layout to US International.

With US International, unless I want to hit the key combo to change layouts, I can still write a single or just a few umlauts (say, for a person's name).

I find it easier to keep my focus when I don't have to make the right wrist twister that is otherwise required for { if using a Swedish layout.

Re:Renaming files with mv without typing the name two times by read_if_gay_ on Tuesday April 14, 2020 @01:33AM (#22863009)
Also try setting caps as compose key and using the standard ANSI layout. Solves the problem of always having to double press characters such as quotes.
Re:Renaming files with mv without typing the name two times by Symbiote on Tuesday April 14, 2020 @01:45AM (#22863073)
Minor point: or the UK layout, for a European keyboard (ISO keyboard) with the tall enter key, rather than the American ANSI layout with a wide enter.

The extra key on the UK layout brings # without shift, which is useful, and £ and ¬ which presumably aren't, but could be remapped to something more useful like € and an accent.

Re:Renaming files with mv without typing the name two times by Lio on Tuesday April 14, 2020 @05:04AM (#22863964)
As a UK user I switched to an alternative layout many years ago for RSI reasons. My preference is Colemak but I don't think it matters too much which layout you opt for.

For me the advantage, other than less finger travel, is that the markings on the keys don't match the layout I use. I've been forced a long time ago to commit it all to memory and learn to touch type without looking at the keyboard.

Touch typing is a small thing but is a massive productivity boon just on it's own even if you're not a speed daemon because you don't have to think to type.

Re:Renaming files with mv without typing the name two times by rhizome on Tuesday April 14, 2020 @04:14PM (#22870889)
Touch typing is not a small thing.
Re:Renaming files with mv without typing the name two times by mkl on Tuesday April 14, 2020 @08:58AM (#22865280)
UK layout makes it hard to press enter or left shift. I find it frustrating and bad for my joints.
Re:Renaming files with mv without typing the name two times by Symbiote on Tuesday April 14, 2020 @02:50PM (#22869905)
I'm only suggesting it for people already used to that physical layout of the keys. Germans, French, Spanish, Swedish etc.

It means they can continue to use normal keyboards (including on laptops) in their country.

Re:Renaming files with mv without typing the name two times by Tistron on Tuesday April 14, 2020 @03:06AM (#22863404)
I totally agree with this. Another problem are some programs where shortcuts seem to bind to some hardware codes of keys instead of what your layout says, so that shortcuts aren't what they say they are, e.g ctrl+[ would be at ctrl-å instead of ctrl+altGr+9 on a swedish keyboard (which I guess couldn't work because altGr is the same as ctrl+alt, or is that not true?)

In my situation I write in english, swedish, danish and sometimes icelandic as well as in programming languages. My solution has been to create my own keyboard layout that I call Nordic Programmer which is the US keyboard but by pressing altGr I have åäö letters where they are supposed to be, and øæ next to them. and then on altGr+eyuioadt i have éýúíóáðþ for icelandic. All of them are capitalized by adding shift. This was pretty easy to learn to use and makes me not have to switch keyboard all the time. It is not truly nordic I guess, because it prioritizes swedish which is the keyboard I learned growing up.

Re:Renaming files with mv without typing the name two times by kps on Tuesday April 14, 2020 @11:53AM (#22867487)
> shortcuts seem to bind to some hardware codes of keys instead of what your layout says

You don't say what platform you use, but this can be true of Windows and Windows-derived systems (which includes a lot of web stuff on all platforms because Netscape foolishly exposed Windows internal key codes 25 years ago). The non-alpha VK (virtual key) codes migrate all over the place¹ or worse disappear (e.g. Turkish doesn't have the VK corresponding to US +/= at all).

I used to work on Chrome OS which currently does this (trying very hard to emulate the Windows rearrangements due to the Netscape web legacy) but will shortly try the “what they say they are” method behind an experimental flag; that is, for example, the shortcut Ctrl+[ would be typed by Ctrl plus whatever you type to get ‘[’.

¹ http://kbdlayout.info/

Re:Renaming files with mv without typing the name two times by Tistron on Wednesday April 15, 2020 @03:08AM (#22875317)
Yes, it's on Windows I have experienced this issue.

I'm not familiar with the low level mechanics of this but you seem to be. How would it work to do what you write at the end? Isn't altGr just an easier way of typing ctrl+alt? Getting ctrl+[ would then be ctrl+ctrl+alt+9. Or is it a proper key of its own?

Re:Renaming files with mv without typing the name two times by kps on Wednesday April 15, 2020 @11:58AM (#22879293)
AltGraph is physically the key that is right-Alt on US keyboards. My understanding is that Windows has Ctrl+Alt as an alternative because some long ago PS/2 keyboards didn't distinguish the two Alt, so it wouldn't be able to take the same approach.
Re:Renaming files with mv without typing the name two times by RMPR on Tuesday April 14, 2020 @01:38AM (#22863032)
Couldn't agree more, was using the French layout and while learning vim I always asked myself what are those weird keybindings, switching to US layout, they suddenly started to make sense because the keys are more reachable without the usual gymnastic.
Re:Renaming files with mv without typing the name two times by lkuty on Tuesday April 14, 2020 @02:45AM (#22863317)
So true. In a month I will receive my new laptop with a qwerty US layout instead of the belgian azerty one I used until now. Using an external keyboard for now, I already see the benefit of qwerty for programmers. And I also switch from macOS to Linux with i3wm.
Re:Renaming files with mv without typing the name two times by GonzaloQuero on Tuesday April 14, 2020 @05:18AM (#22864034)
I never understood why most programming languages where so heavy in brackets until I moved to the UK and saw the layout. Then it clicked.
Re:Renaming files with mv without typing the name two times by wolco on Monday April 13, 2020 @10:36PM (#22862242)
From a UX perspective use a gui file explorer, double click rename.