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

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

Re: Different scan code behavior in X and console


From: 郭晓峰
Subject: Re: Different scan code behavior in X and console
Date: Sat, 14 Jan 2012 23:51:32 -0800

OK, Just found Ctrl-PgDn (and similar keys) are filtered by Mac &
Windows, it works for Linux. So please skip this question.

I'll keep trying to enable CUA mode in emacs later. Will post my
questions later if still have problems.

Sorry to bother.

Best Regards,
Lamu Guo

On Sat, Jan 14, 2012 at 5:14 PM, 郭晓峰 <address@hidden> wrote:
> Forward a mail I just sent to linux-console@
>
> Any idea on this? If this problem can be resolved, I pretty sure CUA
> can be enabled in console mode, including ssh pts.
>
>
> ---------- Forwarded message ----------
> From: <address@hidden>
> Date: Sat, Jan 14, 2012 at 4:52 PM
> Subject: Different scan code behavior in X and console
> To: address@hidden
>
>
> Hi there,
>
> Sorry to bother. Not sure whether it is correct to post this question
> to the mail list, but can't find a suitable linux console user mail
> list for discussing this. If you have good mail list to suggest,
> please help me to forward. Thanks!
>
> The question is: I tried to make my emacs have the same key response
> on both X and console (ssh pts). However, I can't find scan code for
> "Ctrl-PageDown" in console mode. I attached the code for testing the
> scan code, and below is different behavior in X and console:
>
> ============= X ===========
> Press a Key 338   // Just type <PageDown>
> Press a Key 27
> Press a Key 91
> Press a Key 54
> Press a Key 59
> Press a Key 53
> Press a Key 126  // 6-chars for <Ctrl-PageDown>
> ============ Console =========
> Press a Key 338  // Same for <PageDown>
> Press a Key         // No response for <Ctrl-PageDown>
>
> Any idea on this? Greatly appreciate your replies, your suggested
> readings, and so on!
>
> Best Regards,
> Lamu Guo
>
> =============Below is text of the code, for easily reading to skip
> attachment=================
>
> #include <stdlib.h>
> #include <ctype.h>
> #include <curses.h>
>
> int main(void)
> {
>  WINDOW *_window = initscr();
>  int _rows;
>  int _cols;
>
>  cbreak();
>
>  /* Accept all keys */
>  keypad(_window, true);
>
>  /* Don't echo things that are typed */
>  noecho();
>
>  /* Get the screen dimensions */
>  getmaxyx(_window, _rows, _cols);
>
>  /* Don't display cursor */
>  curs_set(0);
>
>  for (;;)
>  {
>    printw("Press a Key ");
>    refresh();
>    int key = wgetch(_window);
>    printw("%d \n", key);
>  }
>
>  endwin();
>
>  return 0;
> }



reply via email to

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