jed-users mailing list

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

Re: jed CUA mode under Linux


----- Original Message ----- 
From: "Malcolm Dew-Jones" <yf110@xxxxxxxxxxxxxx>
To: <jed-users@xxxxxxxxxxx>
Sent: Saturday, December 07, 2002 9:13 AM
Subject: Re: jed CUA mode under Linux


> On Sat, 7 Dec 2002, Andy Sy wrote:
> 
> > jed CUA mode works fine under Windows,
> > but very poorly under Linux because for
> > some reason slang will not read a lot
> > of the required key combinations properly.
> > The Ctrl-LEFT,Ctrl-RIGHT,Ctrl-PgUP, etc...
> > keystrokes all get translated to plain,
> > no modifer strokes.
> 
> How are you accessing the linux box?
> 
> Jed is almost certainly seeing the keystrokes that the keyboard interface
> is providing.  I think the question is how to get the keyboard interface
> to handle the combinations and make them available.

Yes, I found a very clue in linux-keys.txt. It provides a 
keymap which assigns actions to the required key combos. The 
region select functions now works nicely.

But I want to go further, I want to map new key combinations 
like Ctrl-Home, Ctrl-End, Ctrl-Up, Ctrl-Down, Ctrl-Left,
Ctrl-Right to beg_of_buffer, end_of_buffer, scroll_up_in_place,
scroll_down_in_place, bskip_word and skip_word respectively.
Another great CUA style feature I would be region indent/unindent 
via Tab and Shift-Tab but that looks as if it needs some slang 
programming. 

Anyway, I made new entries in the keymap. Here's an example:

#S+Up 
shift keycode 103 = F100
string F100 = "\033[a"

#C+Up
control keycode 103 = F112
string F112 = "\033[^A"

The Shift-Up entry which was put there by the original
author works. However Ctrl-Up won't. :-( The problem 
may lie with the action I assigned to it, F112, which 
I chose arbitrarily. However I can't seem to figure out 
what the proper action to assign to the keys should be.

F112 is an 'action', one of the very many which show up 
if you do a keydump -l. For example there is an action 
'Boot' which if you mapped to a keycode would result in the 
same behaviour as CTRL-ALT-DELETE(*). 

====================================================
(*) Got this from a kewl article on keymap tweaking 
in Linux Gazette issue #6 (available online). 
====================================================

I've got 2 questions you may know the answer to. 

First, I copied the escape sequence ("\033[^A") mapped 
to the action from cua.sl, what exactly does it mean?

And secondly, what does the Gr in AltGr mean?  Linux 
seems to label the 2 Alt keys Alt and AltGr instead 
of Left-Alt and Right-Alt...

Thanks for your very helpful tips. Once I get to the 
bottom of this (and I fully intend to, since slang and 
jed look quite fun to tweak) CUA thing, I hope to 
contribute a How-To, better keymaps, and an updated 
cua.sl. A better CUA mode might increase jed's popularity
immensely. I myself am willing to put up the work of all
this tweaking, which I am loathe to do under vim, if it 
means I can finally get uniform keybindings for both my
GUI mode editor (SciTE for Win32 and Linux) and text mode 
editor (used to be vim but now planning to jettison it in 
favor of jed whose macro language looks pretty nifty).



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


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