Hacker News new | ask | show | jobs
by lenkite 1202 days ago
What about parenthesis () and square brackets [] ? (writing a lisp DSL that might have users from non-US layouts)
1 comments

They are ok to use

I press ⌥ + 8 for square brackets and SHIFT + 8 for parentheses.

It's probably not possible to find better alternatives for Mac keyboards that could be used for a language based on Lisp syntax.

The Mac keyboard simply doesn't have any dedicated keys that are not used for normal text, except for "@". For some unknown reason, they have a dedicated key for umlauts ("¨") that we don't use in our language. I guess I could map it to brackets, but SHIFT + UMLAUT returns a "^" that is often used in regexps and I don't want to lose that.

Windows keyboards has a different layout that is slightly more programmer friendly if you have a full sized keyboard. They do have a backslash key but lack the dedicated "@" key. Windows needs a dedicated backslash due to the file paths, unlike Mac. It is an acceptable tradeoff for Mac users, as non-developers are more likely to use "@" than "\".

Let's just say that there is a reason why I love my IDE that will automatically add closing curly brackets when it detects a block.

I think the umlaut key exists on Norwegian and Danish keyboard so occasional Swedish and German names can be typed.