Hi there,

I tried to catch scan code by some small code, and below is behavior
with click "Ctrl-PageDown"

=========== In Xterm ===============
$./a.out
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 bytes returned
Press a Key

=========== In tmux ===============
$./a.out
Press a Key    // no response

Below is the code:


#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;
}

Do I need to change some config for tmux to enable keys like Ctrl-Fn,
including PgDn/PgUp/Left/Right/...

Best Regards,
Lamu Guo

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to