[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key bindings
Re: key bindings
Wed, 21 Jul 2004 06:54:01 +1000
On Tue, 2004-07-20 at 13:35, Phil!Gregory wrote:
> bindkey -k k1 bindkey -d
> > Is it possible to do something like:
> > bindkey -d -k ^PgUp previous
> > bindkey -d -k ^PgDn next
> Hm. I don't see a way to do this with the termcap codes, since I don't
> see one for Ctrl-PgUp. The hackish approach is to do something like
> 'cat > /dev/null' then press C-v and the key conbination to see what
> characters your terminal sends for that key. (My gnome-terminal seems to
> send ^[[5;5~ for C-PgUp and ^[[6;5~ for C-PgDn.) Then you just use
> bindkey to capture that key sequence:
> bindkey ^[[5;5~ previous
That's marvellous and works perfectly. Thanks.
BTW, that C-v, followed by key combination (eg. C-PgUp) thing seems a
little arcane - I checked man bash and it is (at least) bash's "quoted
insert" mechanism. I guess in my case it is in fact a bashism. And the
"v" in C-v kind of looks like an insertion symbol too I guess.
> > Typing CTRL-a a gets a little tedious.
> Indeed. This is why many people rebind the escape key to something they
> use less often. I have mine set to C-z.
OK, this one I tried many, many combinations - bind, bindkey, no
command, "" or '' as command, searching man page for "unbind" and all
instances of "bind", passing ^A and ^a, with and without -k option (for
bindkey, each time rerunning screen to see if it worked, and in no
combination did I successfully manage to "unbind" the C-a key in screen.
I did however successfully bind F2 (ie. Fn12) to also be screen's
"command" key. So I'm putting that into my muscular memory.
Does anyone know of an app that commonly uses F12 for some other
purpose, and if so, what better alternatives you'd suggest for screen's
command key? Fn11, Fn10 ?
C-a is common for EMACS and bash.
C-z I personally use on pretty much a daily basis (but only once or
twice a day on average I imagine).
C-w is close-window in browsers.
C-q is common in vim (macros I think).
C-d I use very frequently (exit shell).
C-c - yeah right :)
C-x - ?? - although this is a Windows Cut n paste key.
Actually, is S-C-a used in EMACS (Shift+CTRL+a)? If not, how do I get
the key code so I can map it? When I use the cat > /dev/null trick, C-a
and C-A both result in "^A" ?
(Of course, I still need to unbind C-a as well.)
Thanks for all the feedback I've been getting
Re: key bindings, Zenaan Harkness, 2004/07/20