raw-win32-keyboard-mode patch

Egor Duda deo@logos-m.ru
Fri Feb 16 07:38:00 GMT 2001


Hi!

  i   wrote   a   program   called "ttyfier" which allows starting any
win32  console    application   (or attaching to the existing one) and
 work   with  it  via  cygwin's  tty  interface. basically, this means
that you can start any console    application  (including dos programs
in ntvdm)  on   remote machine  via Corinna's port of openssh and work
with  it  interactively (a-la pcAnywhere).

i'll  announce it shortly in cygwin list and post it on my home page.

this   program   requires,  however,  a  small  support  feature  from
cygwin1.dll,  which  is  implemented in this patch. Sending \033[2000h
sequence  to cygwin console makes it switch to "raw-win32" mode, where
every win32 keyboard event is translated to \033{x;y;z;t;u;vK sequence
where   in  x, y, z, t, u and v  the  fields  of  KEY_EVENT_RECORD are
encoded. \033[2000l turns raw-win32 mode off.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
raw-win32-keyboard-mode.diff
raw-win32-keyboard-mode.ChangeLog

-------------- next part --------------
2001-02-16  Egor Duda  <deo@logos-m.ru>

	* fhandler_console.cc (use_mouse): Remove. Make mouse handling
	per-console.
	* fhandler.h (class fhandler_console): Move use_mouse here.
	* fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
	function.
	* fhandler_console.cc (fhandler_console::fhandler_console): Turn
	mouse handling and raw-win32 keyboard mode off by default.
	* fhandler_console.cc (fhandler_console::read): If in raw-win32
	keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
	sequences.
	* fhandler_console.cc (fhandler_console::char_command): Treat
	\033[2000h as a command to enable raw-win32 keyboard mode and
	\033[2000l as a command to disable it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw-win32-keyboard-mode.diff
Type: text/x-diff
Size: 3657 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010216/df5ef539/attachment.bin>


More information about the Cygwin-patches mailing list