[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Binding f2 u
From: |
Eduard Wiebe |
Subject: |
Re: Binding f2 u |
Date: |
Tue, 09 Feb 2010 22:02:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) |
Steve Wainstead <wainstead@gmail.com> writes:
Hi,
> I'm trying to bind "f2 u" to a custom function. After spelunking the
> *Help* and googling, it seems F2 is the prefix key for the sparse
> keymap "2C-command," or else "2c-mode-map."
>
> By default, when one starts emacs -q -nw, f2-s starts two column mode;
> so something must live in the global map? Because I cannot bind
> anything to either 2C-command or 2c-mode-map:
>
> (define-key 2C-command "u" 'sw-update-builds)
> or
> (define-key 2c-mode-map "u" 'sw-update-builds)
>
> These fail because 2C-command and 2c-mode-map are void, while:
>
> (define-key ctl-x-map "9" 'sw-update-builds)
>
> does work. How can I bind to f2-u without wiping out the existing mode
> map, which seems to be undefined even after I load 2 column mode? I'll
> wind up just creating my own sparse keymap for f2 otherwise.
How about this:
(global-set-key (kbd "<f2> u") (lambda () (interactive) (message "YES")))
--
Eduard Wiebe
- Binding f2 u, Steve Wainstead, 2010/02/09
- Re: Binding f2 u,
Eduard Wiebe <=