News for hackers. Stuff that matters.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by jws on Friday October 28, 2016 @11:08AM (#12816600)
Bah, these entitled kids. I guess being old enough to remember keyboards before they had escape keys helps, but ␛ is just keyboard syntactic sugar for control left square bracket. Read your ASCII table! C-[ is even a quicker type avoiding RSIs from all those long pinky reaches.

(More seriously, as much as it bothers me to retrain my pinky, most uses of the escape key would be many times better if the lefthand side of the touch bar had a word for the function, like stop being full screen, cancel, leave menu, or whatever. The function would then be discoverable instead of secret lore.)

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by cypres on Friday October 28, 2016 @11:14AM (#12816699)
I had no idea you could use C-[ as ESC
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mrweasel on Friday October 28, 2016 @11:22AM (#12816831)
It's also a kinda crappy alternative, because it's not possible on a large number of non-English keyboard. Ctrl+c is also an option, although I think there's a slight difference.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by EdiX on Friday October 28, 2016 @11:30AM (#12816995)
ESC is 0x1B, traditionally the CTRL key reset the two highest bit of the ASCII code, [ is 0x5B, if you reset the two highest bits of 0x5B you get 0x1B which is why ESC and CTRL-[ are the same thing.

CTRL-C is completely different.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by edoceo on Friday October 28, 2016 @11:27AM (#12816926)
Yep, ctrl+c is different than esc
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by uw_rob on Friday October 28, 2016 @11:46AM (#12817222)
I am on Windows and it seems that not every program accepts C-[ as ESC. However Vim in Cygwin does accept it as ESC.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by Theodores on Friday October 28, 2016 @11:41AM (#12817167)
I wonder how many vim users have tried using CTRL + [ for the first time today. Muscle memory being what it is I fully expect that nobody will swap over to this new and improved Apple way of pressing the Escape key.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by mst on Friday October 28, 2016 @01:31PM (#12818495)
Much to my surprise, after I was forced by circumstances to use Ctrl+[ for a month or so, I found I didn't actually want to go back to Esc.

Had it only been a week or two I suspect my muscle memory wouldn't've shifted though.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by 3chelon on Friday October 28, 2016 @11:55AM (#12817348)
And vi too - works just fine, but you have a valid point about muscle memory, which is pretty much the only kind of memory many of us have left when it comes to vi-like editors, since the key sequences disappeared from our brains decades ago!
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by seanmcdirmid on Friday October 28, 2016 @12:32PM (#12817770)
That is kind of cool! It is much easier to hit then ESC all the way up in the northwest corner of my keyboard.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by Ph0X on Friday October 28, 2016 @12:43PM (#12817902)
What do you mean by that last line? Well for one thing the bar is customizable by each app, but still, from the examples, they show very clear icons of function.

This is already far superior than just F1, F2, etc, which are far far more cryptic than a descriptive icon.

That's the thing, most apps already do use F keys for custom bindings, but you have to manually memorize them for each different app. Here, you at least get to see the correct icon in each program you're using.

And as a bonus, you get variable size buttons, sliding input, colors, and much more that just isn't possible with simple buttons.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by tjr on Friday October 28, 2016 @11:36AM (#12817097)
I use ␛ as the Meta key in Emacs. I just tried using C-[ instead. It works, but you have to press down both CTRL and [ at the same time; you can't flam CTRL and then [.

I am reminded also of one time trying to write C code on an IBM AS/400, only to find that the keyboard did not have square bracket keys at all...

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by sdegutis on Friday October 28, 2016 @11:25AM (#12816894)
A lot of non-command-line developer apps use Escape though, like all Jetbrain's IDEs.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by acdha on Friday October 28, 2016 @11:51AM (#12817283)
What are the odds that someone at JetBrains didn't order one of these because they realize how cool it would be if the IDE displayed real terms like “Refactor”, “Step Into”, “Open method declaration”, “Deploy”, etc. for the very large number of context-dependent shortcuts a modern IDE has?
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by kps on Friday October 28, 2016 @01:22PM (#12818386)

  > ␛ is just keyboard syntactic sugar for control left square bracket
Technically — and here I go of on the stereotypical irrelevant nerd tangent (bind the adjectives as you will) — it's the other way around. ASCII was certainly designed with Shift and Control modifiers in mind, and arranged so that a device could have those keys merely flip a bit (see e.g. <https://en.wikipedia.org/wiki/Bit-paired_keyboard>), but nothing actually mandates that those keys exist and that Control+h generate Backspace or Shift+h generate H.

I absolutely agree that Control+x ↦ x&0x3F is an established convention, and it continually annoys me that Windows and Windows-aping software violates it.

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by TheGRS on Friday October 28, 2016 @12:49PM (#12818000)
Ha, this is like "walked 5 miles in the snow uphill to school" territory.

I personally don't like the idea of losing some keys, keys are nice, my fingers can feel where they are at all times. But that said my fingers also know exactly where to go without the feedback of the keys. I do like the prospect of programming a custom touch bar for various programs, that seems kind of neat, but I would have also been fine with keeping my function keys (I mean custom bindings are what function keys are for in the first place, no?).

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by 3chelon on Friday October 28, 2016 @11:52AM (#12817296)
Awwwwww man!! You just brought back such green-CRT-tinted memories there...
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by heeen2 on Friday October 28, 2016 @12:55PM (#12818062)
How about non-US keyboard layouts? [ alone is altgr-8 on german layout.
Re:New MacBook Pro Is Not a Laptop for Developers Anymore by Matthias247 on Friday October 28, 2016 @03:42PM (#12819918)
I wondered about that in the other thread. But it actually works with Ctrl+Ä or Ctrl-Ü (depending whether you are in OSX or Windows) in the console.

However this still does not help for a missing ESC in other applications (like IDEs where you sometimes want to close an annoying intellisense dialog).

Re:New MacBook Pro Is Not a Laptop for Developers Anymore by aikah on Friday October 28, 2016 @11:59AM (#12817397)
> Bah, these entitled kids.

Yeah these entitled kids paying > $3000 for a product, they should just shut up and give money to Apple /s