By using the function map_input
the user is able to remap
characters input from the terminal before jed's keymap routines have a
chance to act upon them. This is useful when it is difficult to get jed
to see certain characters. For example, consider the CTRL-S
character. This character is especially notorious because many systems
use it and CTRL-Q for flow control. Nevertheless Emacs uses
CTRL-S for searching. Short of rebinding all keys which involve a
CTRL-S how does one work with functions that are bound to key
sequences using CTRL-S? This is where map_input
comes into
play. The map_input
function requires two integer arguments which
define how a given ascii character is to be mapped. Suppose that you wish
to substitute CTRL-\
for CTRL-S everywhere. The line
map_input (28, 19);will do the trick. Here 28 is the ascii character of CTRL-
\
and 19 is the ascii character for the CTRL-S.
As another example, consider the case where the backspace key sends out a CTRL-H instead of the DEL character (CTRL-?).
map_input (8, 127);will map the CTRL-H (ascii 8) to the delete character (ascii 127).