help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwanted keybinding translation


From: Oleksandr Gavenko
Subject: Re: Unwanted keybinding translation
Date: Sat, 01 Sep 2012 10:26:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]