* windows key as super
@ 2009-11-18 11:46 Giovanni Gigante
2009-11-19 19:16 ` LanX
0 siblings, 1 reply; 10+ messages in thread
From: Giovanni Gigante @ 2009-11-18 11:46 UTC (permalink / raw)
To: help-gnu-emacs
I am using emacs 22.2.1 on debian 5.0.3, through a VNC connection from a
windows machine, and I am trying to configure the windows key for some
emacs shortcut.
VNC is configured to "pass special keys directly to server".
Then I tried in emacs:
(global-set-key (kbd "s-s") 'save-buffer)
However, this does not seem to work. If I type "windows - s", all I get
is an s.
According to xev, this is what happens when I tap the windows key in a
terminal window:
KeyRelease event, serial 30, synthetic NO, window 0x2800001,
root 0x2e, subw 0x0, time 118816809, (423,786), root:(448,849),
state 0x0, keycode 255 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
so it seems that the super key is being received after all, but emacs
ignores it.
BTW, running emacs on the console (locally, sans VNC) gives the same result.
What am I doing wrong?
Thanks
Giovanni
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-18 11:46 windows key as super Giovanni Gigante
@ 2009-11-19 19:16 ` LanX
2009-11-19 19:22 ` LanX
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: LanX @ 2009-11-19 19:16 UTC (permalink / raw)
To: help-gnu-emacs
Hi
On 18 Nov., 12:46, Giovanni Gigante <g...@cidoc.iuav.it> wrote:
> Then I tried in emacs:
> (global-set-key (kbd "s-s") 'save-buffer)
Hm works for me (without VNC)
Keybindings are a science of it's own, I remember there was a huge
tutorial with dozens of pages about it somewhere in the internet, but
I can't find it anymore.
anyhow there is a trick I use, if just getting it done is more
important than portability.
Try to bind interactively and investigate the generated lispcode with
"redo"
M-x local-set-key RET s-s RET save-buffer
C-x ESC ESC
What I get is: (local-set-key (quote [8388723]) (quote save-buffer))
which I can include (simplified) as
(local-set-key '[8388723] 'save-buffer)
in my .emacs.
HTH
Rolf
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-19 19:16 ` LanX
@ 2009-11-19 19:22 ` LanX
2009-11-20 3:08 ` Stefan Monnier
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: LanX @ 2009-11-19 19:22 UTC (permalink / raw)
To: help-gnu-emacs
On 19 Nov., 20:16, LanX <lanx.p...@googlemail.com> wrote:
> anyhow there is a trick I use, if just getting it done is more
> important than portability.
OK found it, praise emacswiki! 8)
http://www.emacswiki.org/emacs/KeybindingGuide
http://www.nongnu.org/emacs-tiny-tools/keybindings/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-19 19:16 ` LanX
2009-11-19 19:22 ` LanX
@ 2009-11-20 3:08 ` Stefan Monnier
2009-11-20 10:37 ` Kevin Rodgers
[not found] ` <mailman.11146.1258713615.2239.help-gnu-emacs@gnu.org>
2009-11-20 3:15 ` Kevin Rodgers
2009-11-20 17:33 ` Giovanni Gigante
3 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2009-11-20 3:08 UTC (permalink / raw)
To: help-gnu-emacs
> (local-set-key '[8388723] 'save-buffer)
You can also put point right after the large number and hit C-x C-e
twice: the echo area will then show you various alternative ways to
write this number:
8388723 (#o40000163, #x800073, ?\s-s)
so you can then write:
(local-set-key '[?\s-s] 'save-buffer)
-- Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-19 19:16 ` LanX
2009-11-19 19:22 ` LanX
2009-11-20 3:08 ` Stefan Monnier
@ 2009-11-20 3:15 ` Kevin Rodgers
2009-11-20 17:33 ` Giovanni Gigante
3 siblings, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2009-11-20 3:15 UTC (permalink / raw)
To: help-gnu-emacs
LanX wrote:
> Hi
>
> On 18 Nov., 12:46, Giovanni Gigante <g...@cidoc.iuav.it> wrote:
>> Then I tried in emacs:
>> (global-set-key (kbd "s-s") 'save-buffer)
>
> Hm works for me (without VNC)
>
> Keybindings are a science of it's own, I remember there was a huge
> tutorial with dozens of pages about it somewhere in the internet, but
> I can't find it anymore.
>
> anyhow there is a trick I use, if just getting it done is more
> important than portability.
>
> Try to bind interactively and investigate the generated lispcode with
> "redo"
>
> M-x local-set-key RET s-s RET save-buffer
>
> C-x ESC ESC
>
> What I get is: (local-set-key (quote [8388723]) (quote save-buffer))
> which I can include (simplified) as
>
> (local-set-key '[8388723] 'save-buffer)
>
> in my .emacs.
(local-set-key (kbd "s-s") 'save-buffer)
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-20 3:08 ` Stefan Monnier
@ 2009-11-20 10:37 ` Kevin Rodgers
[not found] ` <mailman.11146.1258713615.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2009-11-20 10:37 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier wrote:
>> (local-set-key '[8388723] 'save-buffer)
>
> You can also put point right after the large number and hit C-x C-e
> twice: the echo area will then show you various alternative ways to
> write this number:
>
> 8388723 (#o40000163, #x800073, ?\s-s)
>
> so you can then write:
>
> (local-set-key '[?\s-s] 'save-buffer)
Just curious: why quote the vector?
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
[not found] ` <mailman.11146.1258713615.2239.help-gnu-emacs@gnu.org>
@ 2009-11-20 14:55 ` Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2009-11-20 14:55 UTC (permalink / raw)
To: help-gnu-emacs
>> (local-set-key '[?\s-s] 'save-buffer)
> Just curious: why quote the vector?
Duh, yes, sorry, I copy&pasted without even noticing it.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-19 19:16 ` LanX
` (2 preceding siblings ...)
2009-11-20 3:15 ` Kevin Rodgers
@ 2009-11-20 17:33 ` Giovanni Gigante
2009-11-20 19:04 ` Peter Dyballa
[not found] ` <mailman.11187.1258743907.2239.help-gnu-emacs@gnu.org>
3 siblings, 2 replies; 10+ messages in thread
From: Giovanni Gigante @ 2009-11-20 17:33 UTC (permalink / raw)
To: help-gnu-emacs
Thanks for all your replies and resources; however, I still have problems.
It seems that my windows key is mostly ignored by emacs. For example, if
I try "M-x local-set-key RET", and then I type windows-s, all emacs
gets is the s; the windows key is not seen.
I've tried this in several settings, this is the result:
gets windows keys?
(1) emacs -nw in linux cli console: NO
(2) emacs -nw in gnome terminal: NO
(3) emacs -nw remotely via ssh PuTTY: NO
(4) X11 emacs locally: YES
(5) X11 emacs remotely via VNC: NO
basically, only in one situation emacs notes that I pressed the windows key.
I can survive if it doesn't work in the text-only modes. However, what I
am really interested is (5).
In both (4) and (5), xev reports "Super_L" being pressed, although with
a different keycode (115 in (4), 255 in (5)). So it seems that the key
press reaches X11 in both cases. Only, in (5) emacs ignores it. Any idea
why?
giovanni
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
2009-11-20 17:33 ` Giovanni Gigante
@ 2009-11-20 19:04 ` Peter Dyballa
[not found] ` <mailman.11187.1258743907.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2009-11-20 19:04 UTC (permalink / raw)
To: Giovanni Gigante; +Cc: help-gnu-emacs
Am 20.11.2009 um 18:33 schrieb Giovanni Gigante:
> In both (4) and (5), xev reports "Super_L" being pressed, although
> with a different keycode (115 in (4), 255 in (5)). So it seems that
> the key press reaches X11 in both cases. Only, in (5) emacs ignores
> it. Any idea why?
Check with 'xmodmap -pm' your X11 modifier settings and then adjust
accordingly!
--
Greetings
Pete
To be is to do.
– I. Kant
To do is to be.
– A. Sartre
Yabba-Dabba-Doo!
– F. Flintstone
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: windows key as super
[not found] ` <mailman.11187.1258743907.2239.help-gnu-emacs@gnu.org>
@ 2009-11-21 16:57 ` Giovanni Gigante
0 siblings, 0 replies; 10+ messages in thread
From: Giovanni Gigante @ 2009-11-21 16:57 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa wrote:
> Check with 'xmodmap -pm' your X11 modifier settings and then adjust
> accordingly!
it works! thanks a lot.
giovanni
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-11-21 16:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18 11:46 windows key as super Giovanni Gigante
2009-11-19 19:16 ` LanX
2009-11-19 19:22 ` LanX
2009-11-20 3:08 ` Stefan Monnier
2009-11-20 10:37 ` Kevin Rodgers
[not found] ` <mailman.11146.1258713615.2239.help-gnu-emacs@gnu.org>
2009-11-20 14:55 ` Stefan Monnier
2009-11-20 3:15 ` Kevin Rodgers
2009-11-20 17:33 ` Giovanni Gigante
2009-11-20 19:04 ` Peter Dyballa
[not found] ` <mailman.11187.1258743907.2239.help-gnu-emacs@gnu.org>
2009-11-21 16:57 ` Giovanni Gigante
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).