* a question about keymaps
@ 2007-06-30 21:38 nusret
2007-06-30 22:58 ` Peter Dyballa
0 siblings, 1 reply; 6+ messages in thread
From: nusret @ 2007-06-30 21:38 UTC (permalink / raw)
To: help-gnu-emacs
Dear list members,
I tried the following in my _emacs file:
(define-key function-key-map [S-C-mouse-3]
[C-mouse-1])
But it doesn't bring up the buffer menu (that was what
I expected). I get a message in the minibuffer:
"<C-mouse-1> is undefined".
On the other hand, the following advances the point by
one line (without any selection), but I get a message
"Function returns invalid key sequence":
(define-key function-key-map [S-C-mouse-3] 'next-line)
All in all, obviously I'm doing something wrong, but I
couldn't figure it out yet.
QUESTION: How can I correct the first form so that it
does what I expect? Also, what causes this behavior?
I'm not claiming any bug whatsoever, I'm just trying
to understand, and actually the whole point of this
exercise was just that.
I'll appreciate any explanation and/or hints.
thank you in advance.
nusret
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a question about keymaps
2007-06-30 21:38 a question about keymaps nusret
@ 2007-06-30 22:58 ` Peter Dyballa
2007-06-30 23:25 ` nusret
2007-06-30 23:27 ` nusret
0 siblings, 2 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-06-30 22:58 UTC (permalink / raw)
To: nusret; +Cc: help-gnu-emacs
Am 30.06.2007 um 23:38 schrieb nusret:
> QUESTION: How can I correct the first form so that it
> does what I expect? Also, what causes this behavior?
You need to bind a key to a function. [C-mouse-1] is no function.
Typing C-h k and then pressing C-mouse-1 you get the function bound
to the left-most mouse key(mouse-buffer-menu) . Then bind it to S-C-
mouse-3!
--
Greetings
Pete
How many Microsoft engineers does it take to screw in a light-bulb?
None.
They just redefine "dark" as the new standard.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a question about keymaps
2007-06-30 22:58 ` Peter Dyballa
@ 2007-06-30 23:25 ` nusret
2007-06-30 23:27 ` nusret
1 sibling, 0 replies; 6+ messages in thread
From: nusret @ 2007-06-30 23:25 UTC (permalink / raw)
To: help-gnu-emacs
--- Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
> Am 30.06.2007 um 23:38 schrieb nusret:
>
> > QUESTION: How can I correct the first form so that
> it
> > does what I expect? Also, what causes this
> behavior?
>
> You need to bind a key to a function. [C-mouse-1] is
> no function.
>
> Typing C-h k and then pressing C-mouse-1 you get the
> function bound
> to the left-most mouse key(mouse-buffer-menu) . Then
> bind it to S-C-
> mouse-3!
Peter,
Thank you for the suggestion.
The reason I tried what i tried is the following:
(define-key function-key-map [(control tab)] [?\M-\t])
This one works and binds "\C-\t" to the action of the
key [?\M-\t]. Yet the other one doesn't work. there
should be a reason for this, but I'm not sure what.
What could be the difference?
As to your suggestion, I tried it upon your
suggestion. But it gives the error: "Function returns
invalid key sequence" Apparently the function
"mouse-buffer-menu" requires an argument and probably
this causes the problem?? Just a guess... Any
suggestions?
thank you again,
Nusret
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a question about keymaps
2007-06-30 22:58 ` Peter Dyballa
2007-06-30 23:25 ` nusret
@ 2007-06-30 23:27 ` nusret
2007-07-01 14:30 ` Peter Dyballa
1 sibling, 1 reply; 6+ messages in thread
From: nusret @ 2007-06-30 23:27 UTC (permalink / raw)
To: help-gnu-emacs
--- Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
> Am 30.06.2007 um 23:38 schrieb nusret:
>
> > QUESTION: How can I correct the first form so that
> it
> > does what I expect? Also, what causes this
> behavior?
>
> You need to bind a key to a function. [C-mouse-1] is
> no function.
>
> Typing C-h k and then pressing C-mouse-1 you get the
> function bound
> to the left-most mouse key(mouse-buffer-menu) . Then
> bind it to S-C-
> mouse-3!
Just to be precise, the following gives the "Function
returns invalid key sequence" error.
(define-key function-key-map [S-C-mouse-3]
'mouse-buffer-menu)
Nusret
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a question about keymaps
2007-06-30 23:27 ` nusret
@ 2007-07-01 14:30 ` Peter Dyballa
2007-07-01 15:08 ` nusret
0 siblings, 1 reply; 6+ messages in thread
From: Peter Dyballa @ 2007-07-01 14:30 UTC (permalink / raw)
To: nusret; +Cc: help-gnu-emacs
Am 01.07.2007 um 01:27 schrieb nusret:
> (define-key function-key-map [S-C-mouse-3]
> 'mouse-buffer-menu)
Why do you try to force a mouse binding into a key map for function
keys? Can this cause the error you describe? How is with another key
map, global-map, or such?
--
Greetings
Pete
If my theory of relativity is proven successful, Germany will claim
me as a German, and France will declare that I am a citizen of the
world. Should my theory prove untrue, France will say that I am a
German, and Germany will declare that I am a Jew.
-- Albert Einstein,
1929
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a question about keymaps
2007-07-01 14:30 ` Peter Dyballa
@ 2007-07-01 15:08 ` nusret
0 siblings, 0 replies; 6+ messages in thread
From: nusret @ 2007-07-01 15:08 UTC (permalink / raw)
To: help-gnu-emacs
--- Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
> Am 01.07.2007 um 01:27 schrieb nusret:
>
> > (define-key function-key-map [S-C-mouse-3]
> > 'mouse-buffer-menu)
>
> Why do you try to force a mouse binding into a key
> map for function
> keys?
Ignorance sir, sheer ignorance ;).
> Can this cause the error you describe? How is
> with another key
> map, global-map, or such?
>
> --
> Greetings
>
> Pete
I changed it to global-map, as you suggested, and it
worked. You may have put your finger on the problem,
apparently mixing mouse bindings and key bindings is
not trivial. But now things are certainly clearer.
Thank you very much for your helpful suggestions!
Nusret
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-01 15:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-30 21:38 a question about keymaps nusret
2007-06-30 22:58 ` Peter Dyballa
2007-06-30 23:25 ` nusret
2007-06-30 23:27 ` nusret
2007-07-01 14:30 ` Peter Dyballa
2007-07-01 15:08 ` nusret
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.