jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Remap ^M


On  2.12.04, Marko Mahnic wrote:
> G. Milde wrote:

...
> The code for x_set_keysym has not changed - it still uses
> 4 tables (Normal, Ctrl, Shift, Ctrl-Shift) with 256 entries.

John: I'd like to renew my feature request
      (http://www.ruptured-duck.com/jed-users-2003/msg00295.html):

 * let x_set_keysym support a wider range of keysyms, including
   the ISO_Left_Tab (i.e. Shift-Tab) so it will work with 
   Xfree86-4 "out of the box".
   
   %  one of the following should work:
          x_set_keysym(0xFE20, '$', Key_Shift_Tab);
          x_set_keysym(0xFE20, 0, Key_Shift_Tab);


> I have almost no experience with different terminals, but here
> is an idea:
>   Jed should internally distinguish between ^M and the Return key.
>   On terminals that generate an ^M for Return key, ^M should be
>   translated into a sequence stored in Key_Return variable.

The problem is, that when jed gets a ^M from a terminal, it has no way to
tell whether this was produced by Ctrl-M or by Return. Remember, jed only
gets a series of strings regardless of whether it is on the local machine
(konsole, DOS, or X-terminal emulator) or on a remote machine accessed
with, say, ssh.

Distinguishing ^M and Return (or ^I and Tab) has to be done by the
terminal (in the linux konsole, loadkeys can be used to load an adapted
keymap). However, most terminals under Unix are rather bad at this and
for interoperability, you need at least some fallback access for
functions on "exotic" key-combis.

Opposed to the "string-fed" jed, xjed can ask the X-server for additional
information and x_set_keysym() can then map the keypress to a unique
keystring.

>   All the references to ^M should be revised and possibly replaced
>   with Key_Return.
>   The same should be done for Tab, Backspace, Delete, ...
>   This means that various XXXterm.c files should be revised.

AFAIK, all keybindings occure in the slang files, so the *.sl files in
JED_ROOT/lib would need this revision.
 
> Another thing. Let's say xterm is a 'reference terminal'
> for keyprocessing. We could make all other termials translate
> their keycodes into xterm keycodes. Them x_set_keysym would
> work on every terminal.

Actually, x_set_keysym() doesnot work on ony terminal, IMHO xjed should
be the "reference".

Also, I get better results (more distinguishable keys) with rxvt.

As configuring a terminal emulator is by no means simple (especially, if
it should work for other programs too), jed could help a bit (and does
with the get_termcap_string() function, so if you use keydefs.sl, the
Key_* values are dependent on the setting of the TERM environment variable).


Günter

-- 
G.Milde web.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]