* Unwanted keybinding translation
@ 2012-08-31 21:56 Thorsten Jolitz
2012-09-01 7:26 ` Oleksandr Gavenko
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2012-08-31 21:56 UTC (permalink / raw
To: help-gnu-emacs
Hi List,
I have the following in my .emacs (since the C-M-v keybinding does not
work on the console in my case):
,---------------------------------------------------------
| ; global key for scroll up a window
| (global-set-key (kbd "C-v") 'scroll-up-command)
|
| ; global key for scroll down a window
| (global-set-key (kbd "M-v") 'scroll-down-command)
|
| ; global key for scroll up other window
| (global-set-key (kbd "C-S-v") 'scroll-other-window)
|
| ; global key for scroll down other window
| (global-set-key (kbd "M-S-v") 'scroll-other-window-down)
`---------------------------------------------------------
(I know that C-v and M-v are the defaults, but if I don't redefine theme
here things don't work out at all)
When I do C-h k 'M-V' I get:
,----------------------------------------------------------------------
| M-v (translated from M-V) runs the command scroll-down-command, which
| is an interactive compiled Lisp function in `window.el'.
|
| It is bound to <prior>, M-v.
`----------------------------------------------------------------------
while doing C-h k 'C-V' I get, as expected:
,--------------------------------------------------------------------
| C-S-v runs the command scroll-other-window, which is an interactive
| built-in function in `C source code'.
|
| It is bound to C-S-v, <M-next>, C-M-v, ESC <next>.
`--------------------------------------------------------------------
Why is that so? Is that more or less a random thing if uppercase and
lowercase keybindings are respected?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unwanted keybinding translation
2012-08-31 21:56 Unwanted keybinding translation Thorsten Jolitz
@ 2012-09-01 7:26 ` Oleksandr Gavenko
2012-09-01 12:45 ` Thorsten Jolitz
0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Gavenko @ 2012-09-01 7:26 UTC (permalink / raw
To: help-gnu-emacs
On 2012-09-01, Thorsten Jolitz wrote:
> I have the following in my .emacs (since the C-M-v keybinding does not
> work on the console in my case):
>
To debug key sequence translation in console use Expect script:
https://sourceforge.net/u/gavenkoa/utils/ci/tip/tree/misc/keyseq.exp?format=raw
or such C program:
#include <stdlib.h>
#include <stdio.h>
int main()
{
int ch;
while ((ch = getchar()) != EOF) {
if (ch == 27) {
puts("key: \\e");
} else if (ch <= 26) {
printf("hex: ox%02x, key: \\C-%c\n", ch, ch+64);
} else {
printf("hex: ox%02x, key: %c\n", ch, ch);
}
}
return EXIT_SUCCESS;
}
You can switch terminal in raw mode before run C program:
$ stty raw
or press RET after.
--
Best regards!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unwanted keybinding translation
2012-09-01 7:26 ` Oleksandr Gavenko
@ 2012-09-01 12:45 ` Thorsten Jolitz
0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Jolitz @ 2012-09-01 12:45 UTC (permalink / raw
To: help-gnu-emacs
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
> On 2012-09-01, Thorsten Jolitz wrote:
>
>> I have the following in my .emacs (since the C-M-v keybinding does not
>> work on the console in my case):
>>
> To debug key sequence translation in console use Expect script:
>
>https://sourceforge.net/u/gavenkoa/utils/ci/tip/tree/misc/keyseq.exp?format=raw
>
> or such C program:
Thanks, I downloaded the script, looks quite useful, have to try it out.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-01 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 21:56 Unwanted keybinding translation Thorsten Jolitz
2012-09-01 7:26 ` Oleksandr Gavenko
2012-09-01 12:45 ` Thorsten Jolitz
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.