all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* global-set-key C-next
@ 2010-11-03  3:08 Philip
  2010-12-09 22:19 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Philip @ 2010-11-03  3:08 UTC (permalink / raw)
  To: help-gnu-emacs

I want to bind the key Control+PageDown. I tried

(global-set-key (kbd "C-next") bury-buffer)

(global-set-key (kbd "C-<next>") bury-buffer)

but those don't work. How can I describe the key?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: global-set-key C-next
  2010-11-03  3:08 global-set-key C-next Philip
@ 2010-12-09 22:19 ` Drew Adams
  2010-12-09 23:41   ` Philip Ganchev
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2010-12-09 22:19 UTC (permalink / raw)
  To: 'Philip', help-gnu-emacs

> I want to bind the key Control+PageDown. I tried
> (global-set-key (kbd "C-next") bury-buffer)
> (global-set-key (kbd "C-<next>") bury-buffer)
> but those don't work. How can I describe the key?

(global-set-key (kbd "C-<next>") 'bury-buffer) or
(global-set-key [(control next)] 'bury-buffer)

You forgot a quote.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: global-set-key C-next
  2010-12-09 22:19 ` Drew Adams
@ 2010-12-09 23:41   ` Philip Ganchev
  2010-12-10  4:43     ` Drew Adams
       [not found]     ` <mailman.57.1291956252.5417.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Philip Ganchev @ 2010-12-09 23:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

On Thu, Dec 9, 2010 at 5:19 PM, Drew Adams <drew.adams@oracle.com> wrote:
>> I want to bind the key Control+PageDown. I tried
>> (global-set-key (kbd "C-next") bury-buffer)
>> (global-set-key (kbd "C-<next>") bury-buffer)
>> but those don't work. How can I describe the key?
>
> (global-set-key (kbd "C-<next>") 'bury-buffer) or
> (global-set-key [(control next)] 'bury-buffer)
>
> You forgot a quote.

Thanks. Although I forgot a quote in my post to the list, I had the
quote in my .emacs file. It tried with both expressions and it does
not work. When I press Ctrl+PageDown, "5~" is inserted (without the
quotes).



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: global-set-key C-next
  2010-12-09 23:41   ` Philip Ganchev
@ 2010-12-10  4:43     ` Drew Adams
       [not found]     ` <mailman.57.1291956252.5417.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2010-12-10  4:43 UTC (permalink / raw)
  To: 'Philip Ganchev'; +Cc: help-gnu-emacs

> >> I want to bind the key Control+PageDown. I tried
> >> (global-set-key (kbd "C-next") bury-buffer)
> >> (global-set-key (kbd "C-<next>") bury-buffer)
> >> but those don't work. How can I describe the key?
> >
> > (global-set-key (kbd "C-<next>") 'bury-buffer) or
> > (global-set-key [(control next)] 'bury-buffer)
> >
> > You forgot a quote.
> 
> Thanks. Although I forgot a quote in my post to the list, I had the
> quote in my .emacs file. It tried with both expressions and it does
> not work. When I press Ctrl+PageDown, "5~" is inserted (without the
> quotes).

Dunno what to say.  Both of those work for me.  Without defining any bindings,
starting with `emacs -Q', what does `C-h k' followed by hitting Ctrl+PageDown
tell you?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: global-set-key C-next
       [not found]     ` <mailman.57.1291956252.5417.help-gnu-emacs@gnu.org>
@ 2010-12-10 21:17       ` Stefan Monnier
  2010-12-10 21:43         ` Drew Adams
       [not found]         ` <mailman.41.1292017466.4804.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-12-10 21:17 UTC (permalink / raw)
  To: help-gnu-emacs

>> not work. When I press Ctrl+PageDown, "5~" is inserted (without the
>> quotes).

That indicates that Emacs doesn't know that what you pressed is C-down.
Apparently you're running inside a text-terminal and the byte-sequence
that the text-terminal sends for C-down is not known to Emacs.

You might want to report this problem via M-x report-emacs-bug,
specifying the text-terminal you were using, the value of the TERM
envvar, and any other data you can think of.

To fix this problem, try the following:

type: 1 1 1 1 1 C-down C-h l
The C-h l will show you the last few raw events Emacs received.  So all
the events that appear there between 1 1 1 1 1 and C-h l are the events
sent by your text-terminal when you press C-down.

Then you can tell Emacs about it with:

  (define-key input-decode-map "<thebytesequence>" [C-down]).

once this is done, hitting C-down should not cause "5~" to be inserted
any more but run some other command instead.  And C-h k C-down should
tell you something like:

   C-down (translated from <bytesequence>) runs blabla


-- Stefan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: global-set-key C-next
  2010-12-10 21:17       ` Stefan Monnier
@ 2010-12-10 21:43         ` Drew Adams
       [not found]         ` <mailman.41.1292017466.4804.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2010-12-10 21:43 UTC (permalink / raw)
  To: 'Stefan Monnier', help-gnu-emacs

> >> not work. When I press Ctrl+PageDown, "5~" is inserted
> 
> That indicates that Emacs doesn't know that what you pressed 
> is C-down....

FWIW, I think you meant C-next (throughout your post).
PageDown is generally the `next' key, not the `down' key.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: global-set-key C-next
       [not found]         ` <mailman.41.1292017466.4804.help-gnu-emacs@gnu.org>
@ 2010-12-10 22:35           ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-12-10 22:35 UTC (permalink / raw)
  To: help-gnu-emacs

>> >> not work. When I press Ctrl+PageDown, "5~" is inserted
>> That indicates that Emacs doesn't know that what you pressed 
>> is C-down....
> FWIW, I think you meant C-next (throughout your post).

Good point, sorry,


        Stefan


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-10 22:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-03  3:08 global-set-key C-next Philip
2010-12-09 22:19 ` Drew Adams
2010-12-09 23:41   ` Philip Ganchev
2010-12-10  4:43     ` Drew Adams
     [not found]     ` <mailman.57.1291956252.5417.help-gnu-emacs@gnu.org>
2010-12-10 21:17       ` Stefan Monnier
2010-12-10 21:43         ` Drew Adams
     [not found]         ` <mailman.41.1292017466.4804.help-gnu-emacs@gnu.org>
2010-12-10 22:35           ` Stefan Monnier

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.