News for hackers. Stuff that matters.
Re:16-inch MacBook Pro by Someone1234 on Wednesday November 13, 2019 @08:46AM (#21523872)
Holy heck, they re-added a physical escape key. That's a huge improvement. a slight shame they didn't just move the touchbar up and re-add the F key row too, but it is a good compromise and improvement regardless.

This could be the one a lot of people have been waiting for if the new switches/design pans out.

PS - Although I might be an unusual demographic as I touch type and wouldn't use the touchbar regardless (since I look at the screen, not the backs of my hands while I interact with a Mac).

Re:16-inch MacBook Pro by 1_player on Wednesday November 13, 2019 @09:13AM (#21524244)
> physical escape key

I'm happy we VIM users have been loud enough to get the most important key back. :-)

I know there's Ctrl-[ but it's 20 years of muscle memory to retrain, and I don't want to do that.

Re:16-inch MacBook Pro by Tankenstein on Wednesday November 13, 2019 @09:30AM (#21524452)
I really recommend rebinding caps lock to escape. macOS lets you do that natively in keyboard setting nowadays. Still muscle memory to relearn, of course.
Re:16-inch MacBook Pro by mooncake on Wednesday November 13, 2019 @09:43AM (#21524615)
I got used to capslock in less than a day when I got MBP. I recommend BetterTouchTool to remove the faux escape key and replace it with something as annoying as "Previous track".

After listening to the same track for a few hours it really stuck.

Re:16-inch MacBook Pro by olalonde on Wednesday November 13, 2019 @11:40AM (#21526085)
Many of us remapped Caps Lock to Ctrl years ago. I know there's a way to use it for both but it's not smooth because it adds a firing delay.
Re:16-inch MacBook Pro by nothrabannosir on Wednesday November 13, 2019 @09:46AM (#21524657)
But you can't rebind esc to anything (natively), so you lose caps lock. Am I the only one who declares constants and envvars in capitals? And how do people write SQL? With their elbow on the shift key?
Re:16-inch MacBook Pro by Zarel on Wednesday November 13, 2019 @10:52AM (#21525482)
I've always just typed constants and SQL with my pinky on the left Shift key. It feels easier than having to toggle Caps Lock all the time.

In situations where I'm excited and messaging my friends to yell, I've typed entire sentences mostly holding down Left Shift. After some experimentation, it looks like even for normal sentence capitalization, I never use Right Shift unless I'm typing one-handed.

Re:16-inch MacBook Pro by PascLeRasc on Wednesday November 13, 2019 @07:30PM (#21531448)
I wonder if there's a way to configure a double-press of left Shift to enable Caps Lock, like we're used to on phone keyboards.
Re:16-inch MacBook Pro by simonklitj on Thursday November 14, 2019 @05:54AM (#21534444)
Seems like Karabiner can handle that: https://github.com/pqrs-org/Karabiner-Elements/issues/346
Re:16-inch MacBook Pro by 1_player on Wednesday November 13, 2019 @10:32AM (#21525222)
I have Karabiner Elements configured to toggle CapsLock with the LShift+RShift combination. Pretty handy, and unlikely to ever hit it accidentally.
Re:16-inch MacBook Pro by throwaway333444 on Wednesday November 13, 2019 @10:04AM (#21524890)
The new versions of sql don’t require capital letters on all the keywords. :p

More seriously color syntax highlighting works far better than capitalizing almost everything in sight. I’d recommend dropping the caps convention.

Re:16-inch MacBook Pro by dharmab on Wednesday November 13, 2019 @10:24AM (#21525119)
Caps for envvars is not a cosmetic convention, it's a style convention to indicate if a variable was sourced from the shell/parent/sourced file vs an internal definition.

Caps for constants is a long standing convention in many style guides and standard libraries.

Re:16-inch MacBook Pro by throwaway333444 on Wednesday November 13, 2019 @07:04PM (#21531251)
You appear to be referring to shell scripts. I do not have an opinion on shell script capitalization. However, my opinion on capital keywords in SQL is that it is a relic of an older time when it was used to help visual parsing of the query.

Going further I’m of the opinion that color syntax highlighting does that job far better thus rendering the capital convention obsolete.

Note: you may have a different opinion than me and if you do the laws of the code formatting holy war demand that I assert that you’d be wrong.

Re:16-inch MacBook Pro by jcranberry on Wednesday November 13, 2019 @10:52AM (#21525478)
acronyms?
Re:16-inch MacBook Pro by Analemma_ on Wednesday November 13, 2019 @11:05AM (#21525647)
Karabiner Elements is free and will let you bind Esc to Caps Lock. It actually allows general remapping for instance I use a Microsoft Sculpt keyboard with my Mac and have that stupid menu key remapped to be a second Option.
Re:16-inch MacBook Pro by swlkr on Wednesday November 13, 2019 @11:06AM (#21525654)
I stopped using caps in SQL a few years ago, it changed my life for the better
Re:16-inch MacBook Pro by tnorthcutt on Thursday November 14, 2019 @09:44AM (#21535708)
Using Karabiner, I have caps lock mapped to escape, and shift+caps lock toggles caps lock.
Re:16-inch MacBook Pro by markus_zhang on Wednesday November 13, 2019 @02:09PM (#21528124)
Yeah I SHIFT everything capital letters. Feel better than Capslock. Not a Mac user but I wish my laptop has semi-full size keyboard (that includes everything excluding the number pad), but that's too big for laptops I guess :(
Re:16-inch MacBook Pro by dharmab on Wednesday November 13, 2019 @10:22AM (#21525095)
I either hold down shift for short vars or use the vim uppercase motion. After a variable is declared then I use autocomplete.

SQL does not have to be written in uppercase generally. If you care, use an autoformatter.

Re:16-inch MacBook Pro by notJim on Wednesday November 13, 2019 @12:32PM (#21526853)
Best move is to bind `jj` to escape.
Re:16-inch MacBook Pro by djtriptych on Wednesday November 13, 2019 @11:47PM (#21532871)
I’ve been doing this, as prompted by being assigned a touchstrip MacBook at my last job.

Have to say I was able to retrain pretty quickly. jj is now my first instinct even on full-sized keyboards. I now think it’s really an improvement. All about staying on that home row as much as possible..

Re:16-inch MacBook Pro by rikkus on Wednesday November 13, 2019 @03:48PM (#21529375)
Except that doesn’t work in every other app that doesn’t understand vi keys.
Re:16-inch MacBook Pro by 1_player on Wednesday November 13, 2019 @09:33AM (#21524491)
Caps Lock is already my Ctrl key, I don't want to get cramps everytime I press Ctrl-C.
Re:16-inch MacBook Pro by djtriptych on Wednesday November 13, 2019 @11:45PM (#21532863)
What kind of monster doesn’t map Caps Lock to CTRL??
Re:16-inch MacBook Pro by CGamesPlay on Wednesday November 13, 2019 @10:04AM (#21524896)
I’ve only been using vim for about 10 years but I’m pretty sure I’ve hit escape less than a few thousand times in those years. One of the first things I did was imap jk <Esc> and it turns out that’s really all I need Escape for (Ctrl-C is goto to return to normal mode)...
Re:16-inch MacBook Pro by ActorNightly on Wednesday November 13, 2019 @06:07PM (#21530771)
You shouldn't be happy that they added that back, you should be pissed that they took it out in the first place, well knowing how many developers use Mac.
Re:16-inch MacBook Pro by appleiigs on Wednesday November 13, 2019 @04:12PM (#21529625)
I think it's more like Excel users have been loud enough. Esc is very important for Excel.
Re:16-inch MacBook Pro by kuu on Wednesday November 13, 2019 @09:39AM (#21524561)
"Holy heck, they re-added a physical escape key. That's a huge improvement"

Amazing how this can be the first comment. What would be next? USB ports? Even jack ports on the iPhone?! /s

Re:16-inch MacBook Pro by jiveturkey on Wednesday November 13, 2019 @03:02PM (#21528815)
> a slight shame they didn't just move the touchbar up and re-add the F key row too

yeah, considering the massive 16" size, there's definitely room for another row of keys. I could see if a diminuitive air came out with touchbar, you want both weight and space savings so nuke it. but with 16" and six speakers just add the damn keys!

Re:16-inch MacBook Pro by hellofunk on Wednesday November 13, 2019 @03:04PM (#21528840)
> Although I might be an unusual demographic as I touch type

This gave me a chuckle since nearly every person I know (90% at least) is a touch typer.

Re:16-inch MacBook Pro by Jonovono on Wednesday November 13, 2019 @09:36AM (#21524527)
Whats with you guys and the ESC key? It's so far away do you actually use it? I map caps-lock to ESC/Hyper key which I find pretty useful.
Re:16-inch MacBook Pro by reificator on Wednesday November 13, 2019 @01:26PM (#21527557)
> Whats with you guys and the ESC key? It's so far away do you actually use it?

You're joking. You realize this forum is filled with programmers and other digital creative professionals, right?

Re:16-inch MacBook Pro by dpkonofa on Wednesday November 13, 2019 @02:45PM (#21528614)
I am both a digital creative professional and a developer/programmer and I can't remember when was the last time I pressed the escape key. If anything, it might have been to exit a full-screen video where the UI had mysteriously disappeared because some crappy website couldn't deal with an ad-blocker.

Programmers and creative professionals don't unilaterally love or need the ESC key like you're suggesting.

Re:16-inch MacBook Pro by tandav on Wednesday November 13, 2019 @03:32PM (#21529191)
For me frequent usecase for ESC is to hide some popup that you opened by accident.

Like "Save As" dialog / rename file / Purchase SublimeText License / etc. In macOS you can hide many types of dialogs with ESC

Re:16-inch MacBook Pro by dpkonofa on Wednesday November 13, 2019 @08:12PM (#21531769)
That's fine but you can still do that without the physical key, can't you? I'm still able to escape out of dialogs like that without needing a physical key.
Re:16-inch MacBook Pro by reificator on Thursday November 14, 2019 @12:15AM (#21532975)
You can also type on a smartphone without a physical keyboard...
Re:16-inch MacBook Pro by Jonovono on Wednesday November 13, 2019 @03:40PM (#21529280)
That's exactly what I mean, yall are smart, that's why I assumed yall would remap it somewhere that makes sense.
Re:16-inch MacBook Pro by reificator on Wednesday November 13, 2019 @06:06PM (#21530766)
If anything, I'd remap capslock to be escape.
Re:16-inch MacBook Pro by Jonovono on Wednesday November 13, 2019 @07:07PM (#21531276)
Ya, i've used this: https://brettterpstra.com/2017/06/15/a-hyper-key-with-karabi... to do that.

And having the hyper key is awesome (command+control+option+shift). Makes it super handy for shortcuts to open commonly used program shortcuts like calendar etc

Re:16-inch MacBook Pro by rootusrootus on Wednesday November 13, 2019 @11:18AM (#21525813)
I'm old and I've been using vim for decades. Remapping caps lock on the internal keyboard would just confuse me because I use my external keyboard as much as I use the internal one, and my external keyboard has caps lock remapped to Command.
Re:16-inch MacBook Pro by BigJ1211 on Thursday November 14, 2019 @08:13AM (#21535087)
The remapping can be used on all your connected keyboards and per keyboard, whatever you prefer.

And if you want extended remapping I'd recommend https://pqrs.org/osx/karabiner/ especially if you're missing the function keys, you can remap that to be fn + number row. So you will have easy access to those as well.

Re:16-inch MacBook Pro by dharmab on Wednesday November 13, 2019 @10:25AM (#21525128)
I grew up playing games like StarCraft so I have muscle memory of moving my hand to the top row for control group management. It's no big deal.
Re:16-inch MacBook Pro by Someone1234 on Wednesday November 13, 2019 @10:15AM (#21525009)
I can reach it from the starting row (ASDF) of my left hand without moving it. This might be more impactful to people with small hands.
Re:16-inch MacBook Pro by asdf21 on Wednesday November 13, 2019 @10:25AM (#21525141)
Vim
Re:16-inch MacBook Pro by Exuma on Wednesday November 13, 2019 @10:49AM (#21525433)
Our VIM Overlords