Hacker News new | past | comments | ask | show | jobs | submit login

Full emacs keybindings:

A lot of key emacs bindings--C-a, C-e, C-n, C-p, C-f, C-b--work in any text field (even, say, the Hacker News comment box). But M-f and M-b (which are really useful since they get you forward/backwards a word instead of just a letter or a whole line) don't work. When I try to type option and then a letter, I get weird symbols:

Here's option-b: ∫

Here's option-f: ƒ

To get make M-f and M-b work, go to Preferences->Settings->Keyboard and check the "Use option as meta key" box.

See http://skitch.com/jackowayed/dme91/terminal-fix-keybindings if you can't find it.




It has nothing to do with Terminal.app, but I consider the ease of making those symbols one of the nice things about text entry on a Mac—I miss it sorely on Ubuntu (where I'm sure the equivalent exists, but (1) I don't know it and (2) it likely requires memorising code points). You can see which keystrokes will produce which funny symbols by turning on Keyboard Viewer (under Input Menu, which itself can be turned on from the International tab under System Preferences.app; or there's probably some way to invoke it directly).


http://www.hermit.org/Linux/ComposeKeys.html

The list is a bit old, but maybe it helps with some odd keys. Now that unicode is pretty common, I try to stick to the ellipsis for example… I have to say that the compose position for dieresis is a bit more logical (compose-" as opposed to macs alt-u), which is quite useful if I don't want to switch keyboard layouts when typing a bit of German (or write a lot about Motörhead and Queensrÿche).

X11 also has "level 3" support, which is straight-forward additional characters when pressing a certain key, as opposed to combining multiple key presses. Mac's alt key basically does both to a certain degree. The fact that it's turned on by default and the keyboard viewer makes it a lot more common usage in my experience.


Heh, all the time I had a Sparc in my office I looked at the 'Compose' key and wondered "Now, what does that do?" Thanks! I'll give this a try.


Some methods:

1. Change your layout from "USA" to "USA International (AltGr dead keys)". Then use right-alt+key to make various special characters (you can look at what each character does at "Show Current Layout").

2. Enable the "compose key" -- I use the Menu key for this -- which is described at http://sivers.org/compose-key (it's simple to enable: Keyboard Preferences→Layouts→Options→Compose Key Position). Both of these are customizable, so you can add your own combinations if you want.

There are some other ways:

3. Ctrl-Shift-U in a GTK+ text input to enter a code point, as you said.

4. Alternative input methods that let you type special characters in in various other ways, such as LaTeX names, if you prefer that.


> 4. Alternative input methods that let you type special characters in in various other ways, such as LaTeX names, if you prefer that.

Yes, please! This would be extraordinary! How do I do it?


That gets you half-way there, but you're still stuck using the option key as meta, rather than the much more natural command key.

To swap the command and option keys, but just in the terminal, you can use: http://github.com/aim-stuff/cmd-key-happy


And of course for standard moving around:

←/→ move left or right one character.

⌥ + ←/→ move left or right one word.

⌘ + ←/→ move to start or end of line


What's even better is that these can be customized: http://news.ycombinator.com/item?id=448218


and while holding down shift, the selection is extended in those ways as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: