[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bind CTRL-S (CTRL-shift-S) separately from CTRL-s?
From: |
Stefan Monnier |
Subject: |
Re: Bind CTRL-S (CTRL-shift-S) separately from CTRL-s? |
Date: |
Sun, 22 May 2011 22:51:14 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> (global-set-key "\C-S" 'blabbafunc)
> (global-set-key "\C-S-s" 'blabbafunc)
You're missing a backslash in front of the second modifier.
I recommend you avoid the string syntax, so if you try
(global-set-key [?\C-S-s] 'blabbafunc)
you'll get a useful error message whereas
(global-set-key [?\C-\S-s] 'blabbafunc)
will be accepted. For some reason it doesn't work for me (the key
seems never to reach Emacs, so it's presumably caught by the WM or
something), but it works for ?\C-\S-d, so the syntax is right.
Stefan