Problems binding function keys (e.g. 'F1') in combination with other keys.

Problems binding function keys (e.g. 'F1') in combination with other keys.

Post by ng1 » Thu, 03 Jun 2004 15:46:41


I thinks this should be simple, but i really cant figure it out.
I want to bind a F-key in combination with other keys.

A normal bind with only function keys works fine:
(global-set-key [f11] 'shell1) <- This works

But i want to combine the F11 key, something like this:
(global-set-key [C-M-f11] 'shell1) <- This fails

So i want it to bind the combination 'Ctrl+Meta+F11'. But the above
syntax is NOT accepted.
I have tried other ways to write it, but with no luck. And yes i have
looked in the documentation of 'define-key'.

When i try to bind [C-M-f11] it just says. "Invalid (FSF Emacs) key
format..."

I have also tried:
(global-set-key "\C-\M-f11" 'shell1) and more.

I really hope you can help me out.

/Michael
 
 
 

Problems binding function keys (e.g. 'F1') in combination with other keys.

Post by Christian » Thu, 03 Jun 2004 18:50:23


XXXX@XXXXX.COM (Michael) writes:


This
(global-set-key [(meta f4)] 'do-stuff)
and this
(global-set-key [(shift f4)] 'do-more-stuff)

works great for me.

[text snipped]


Hth,
Christian

--
Recursive (ri-ker-siv): adj; See "recursive"