Commit Graph

81 Commits

Author SHA1 Message Date
Andrew V. Samoilov
1bee4012b1 * keyxdef.c: Constify struct qnx_key_define_s typedef.
* key.c (get_modifier): Fixed dynamic loading of the Photon library for
        shift keys, only current version of libph used now.
        (qansi_key_defines): Swapped Gray '-' and '+' codes definitions, due to
        fixed bugs in the QNX6's console driver.
2005-03-25 09:38:24 +00:00
Pavel Roskin
504faf19d4 * key.c (init_key): Load xterm_key_defines for terminals with
names starting with "rxvt".
2005-03-21 20:27:55 +00:00
Roland Illig
13a63f21c9 * x11conn.c: Separated X11 connection handling from key.c. Added
error handling for X11 errors and connection errors.
	* x11conn.h: The interface for x11conn.h.
	* key.c: Now using the x11conn code.
	* Makefile.am: Added x11conn.{h,c}.
2005-03-10 09:44:36 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Roland Illig
d5da4d6b94 * key.c (use_8th_bit_as_meta): Use 8bit input as default.
From Vladimir Nadvornik <nadvornik * suse cz>
2004-11-07 12:37:24 +00:00
Andrew V. Samoilov
11c6534e70 * key.c (qansi_key_defines[]): Add support for qansi-m terminals.
Needed on QNX Neutrino. (correct_key_code): Likewise.
2004-09-26 00:58:47 +00:00
Andrew V. Samoilov
ee2e35afb4 * key.c (get_modifier): Recognize keyboard modifiers on Cygwin. 2004-09-14 17:18:25 +00:00
Roland Illig
03913065b4 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:27:40 +00:00
Roland Illig
8458240147 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 16:42:40 +00:00
Roland Illig
493febff35 Added more const-ness to a variable. 2004-08-16 17:45:38 +00:00
Dmitry Alexeyev
6147cf303e * key.c (get_event): Treat all negative values of gpm_fd in the
same way.  Add one more check that gpm is alive.
2003-12-24 07:21:34 +00:00
Pavel Roskin
12d78ba8df * boxes.c: Include "../vfs/gc.h" if VFS is used.
* hotlist.c: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* setup.c: Likewise.
2003-11-07 23:50:18 +00:00
Pavel Roskin
d35cffb9d9 Clean up includes. 2003-10-26 04:03:07 +00:00
Pavel Roskin
8c10c20881 * key.c (init_key_x11): Warning fix for gcc 3.3.2. 2003-10-25 04:19:10 +00:00
Pavel Roskin
f219b81311 * vfsdummy.h: New file to replace vfs.h if VFS is disabled.
* Makefile.am: Add vfsdummy.h.
* global.h [!USE_VFS]: Include vfsdummy.h.  Fix files that
include vfs.h directly.
2003-10-11 08:54:31 +00:00
Pavel Roskin
9ad0e19d57 * key.c (xterm_key_defines): More sequences for gnome-terminal. 2003-09-24 07:06:08 +00:00
Pavel Roskin
aec581084e Add even more sequences (for gnome-terminal this time). 2003-09-24 03:32:23 +00:00
Pavel Roskin
6683f6eae9 Also add Shift-Ins. 2003-09-23 07:01:57 +00:00
Pavel Roskin
a7032726f5 * key.c (xterm_key_defines): Add more sequences. 2003-09-23 06:58:34 +00:00
Pavel Roskin
7f99259757 * key.c (xterm_key_defines): Add keypad keys.
Reported by Vyacheslav Filyayev <vfilyayev@d2.khai.edu>
2003-09-09 16:30:14 +00:00
Pavel Roskin
d388773779 * key.c (xterm_key_defines): Add more sequences for xterm-179 by
Thomas E. Dickey.
2003-07-23 05:44:25 +00:00
Pavel Roskin
944d5c430b * key.c (mc_bindings): Remove. Esc-">" and Esc-"<" are not
always the same as Home and End, at least in mcedit.
(get_key_code): Never ignore Escape outside known sequences.
* screen.c (panel_keymap): Add Esc-">" and Esc-"<".
* tree.c (tree_keymap): Likewise.
* widget.c (input_map): Likewise.
(listbox_key): Likewise.
(check_movement_keys): Likewise.
Reported by Miguel de Icaza <miguel@ximian.com>
2003-06-14 05:19:19 +00:00
Pavel Roskin
bd8919e567 * key.c (correct_key_code): Treat Shift-Backspace as Backspace. 2003-06-09 05:59:00 +00:00
Pavel Roskin
c09c4f0ffc key.c (init_key): Fix crash if TERM is unset. 2003-05-30 19:56:43 +00:00
Pavel Roskin
f6b4657dcb * key.c (xterm_key_defines): Add more sequences for xterm, rxvt
and konsole.
2003-03-14 16:52:33 +00:00
Andrew V. Samoilov
0fbccef3cc * key.c: Use fputs() instead of fprintf().
(func_XOpenDisplay) [HAVE_GMODULE]: Move to init_key_x11().
(get_modifier) [__QNXNTO__]: Use g_snprintf() instead of unsafe sprintf().
2003-03-11 12:23:08 +00:00
Pavel Roskin
867704615b * key.c (correct_key_code): Convert unrecognized 0177, Ctrl-h
and Ctrl-d into Delete and Backspace.  Remove all references to
those keys in other files.
2003-03-10 20:27:54 +00:00
Pavel Roskin
44aac01193 * key.c (get_modifier) [__QNXNTO__]: Remove incorrect check for
the existance of libph.so.1.
2003-03-10 14:38:12 +00:00
Pavel Roskin
1de4ce4890 * key.c (get_modifier): Add support for QNX Photon pterm. 2003-03-10 08:47:37 +00:00
Pavel Roskin
ff82223a35 Remove references to the archaic "linux" preprocessor definition.
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
f5d76afe37 * key.c (get_modifier): Add support for QNX Neutrino console. 2003-02-23 05:36:49 +00:00
Pavel Roskin
66b2b1381c * key.c (init_key_x11): Don't try to use X11 if DISPLAY is not
set in the environment.
2003-02-23 05:23:04 +00:00
Pavel Roskin
92da7e9dc0 * key.c: Add support for dynamic loading of libX11. 2003-02-23 05:05:49 +00:00
Pavel Roskin
781dae3544 * key.c (is_idle): Correct maximal file descriptor and return
value.
2003-01-27 22:37:32 +00:00
Pavel Roskin
3bad66bae8 * key.c (correct_key_code): Don't call get_modifier() for normal
characters - they only should get modifiers from sequences
tables.  This fixes entering characters with AltGr.
Reported by David Martín <dmartina@excite.com>
2002-12-27 16:27:44 +00:00
Pavel Roskin
45f6d2fbec * view.c (max_dirt_limit): Make global to match view.h.
* setup.c (options): Actually save max_dirt_limit, which is
documented as a "special setting".
2002-12-27 06:48:33 +00:00
Pavel Roskin
f2cf13159c * key,c (get_modifier): Warning fix. 2002-12-26 21:23:23 +00:00
Pavel Roskin
7f3a386062 * key.c (correct_key_code): Convert Shift-Tab and Ctrl-Tab to
Back Tab (used in dialogs to jump to the previous widget).
2002-12-25 23:30:49 +00:00
Pavel Roskin
f8958b0a61 * key.c (is_idle): Check for input on input_fd and gpm_fd. 2002-12-25 02:01:31 +00:00
Pavel Roskin
f19f91337b * key.c (correct_key_code): Strip or add modifier information
when necessary.  Recognize shift with function key N as function
key (N + 10).  Fix breakage from previous patch.
* key.h: Change XCTRL and ALT macros to use new definitions for
keyboard modifiers.
2002-12-23 09:46:28 +00:00
Pavel Roskin
0d0009e263 * key.c (get_modifier): Make static. Return the mc internal
representation, not the Linux console code.
(correct_key_code): Add the modifier, not strip it.
(ctrl_pressed): Remove.  Adjust all dependencies.
2002-12-21 08:43:15 +00:00
Pavel Roskin
6e59c48179 * key.h: Add definitions for the keyboard modifiers that can be
part of the key code.
* key.c (xterm_key_defines): Add some common key definitions
with modifiers for xterm and rxvt.
(correct_key_code): Strip and remember modifiers.
(get_modifier): Add support for saved modifiers.
2002-12-21 07:34:49 +00:00
Pavel Roskin
df9b2f4c5c * myslang.h: Don't define ERR - it conflicts with sys/ucontext.h
in glibc 2.1.3.
* key.c: Use -1, not ERR.
2002-11-06 06:08:11 +00:00
Pavel Roskin
dad4215705 * mouse.h: Define events for the mouse wheel.
* key.c (xmouse_get_event): Recognize mouse wheel events.
2002-09-21 00:11:59 +00:00
Pavel Roskin
5d2757fb8d * key.c (get_event): Check gpm_fd only if gpm is actually used.
* layout.c (done_screen): Move disable_mouse() call ...
* main.c (done_mc): ... here.
2002-09-08 15:50:02 +00:00
Pavel Roskin
206fdf6f1d * global.h: Eliminate xgetch, update all dependencies. 2002-09-03 22:23:27 +00:00
Pavel Roskin
517e1cf8e7 * key.c (get_event): Reduce scope of select_set. Don't check
mouse_enabled all the time, instead break out of the loop if it
becomes 0.
2002-08-31 06:40:47 +00:00
Pavel Roskin
8ade32d7d9 * key.c (get_event): Check gpm_fd before using it in FD_SET. If
gpm_fd is -1 (gpm has died), disable mouse support.
2002-08-25 05:47:47 +00:00
Pavel Roskin
60f9328e8d * key.c: Use the maximal file descriptor, not FD_SETSIZE in all
calls to select().
* subshell.c: Likewise.
2002-08-25 05:44:57 +00:00
Pavel Roskin
d0b31c1c81 * key.c (delete_select_channel): Avoid using freed memory. 2002-08-10 04:37:13 +00:00