On Sat, 7 Dec 2002 01:47:21 +0800 wrote Andy Sy <andy@xxxxxxxxxxx>: > In jed CUA mode, ^G^Z allows one step redo of > an undo. Is it possible to map this to ^Y instead? Of course it is (See attached, cua.sl version) > Also, is it possible to allow multiple step redo > instead of just one? No it isn't. (See the implementation of redo in cuamisc.sl) However, after doing one step of redo, further undos will also undo the previous undo-steps. I.e. for a two-step redo do "redo", undo, undo" So this not really a problem. On Sat, 7 Dec 2002 16:02:48 +0800 wrote Andy Sy <andy@xxxxxxxxxxx>: > 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(*). In my opinion, F112 is just a placeholder. In opposition to "boot" (usually bound to Ctrl-Alt-Del) it doesnot start an action. The action it does is: Look if a string is defined for F112 and give this to the application. This is, why the definitions alsway has two lines: binding the key and binding the string variable, e.g. # Key_Ctrl_Right control keycode 106 = F112 string F112 = "\033[" > 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? this means a string composed of the characters 'ESC', '[', and 'Ctrl-A'. As this string doesnot usually appear in a text document, it can be mapped to a special action. (Remember, when going somewher over telnet or the like, the application on the other end doesnot know how many keys you press at the same time, all it gets are the abovementioned strings. And which string does mean which action is (unfortunately) not really standardized for all the keys (the problem comes mainly from UNIX being so old, ther were no F1 or Home keys on the keybord these days). > And secondly, what does the Gr in AltGr mean? AFAIK it means Alt-Group. > Linux seems to label the 2 Alt keys Alt and AltGr instead > of Left-Alt and Right-Alt... This is, what they are labeled on my German keybord too. (And AltGr does invoke an alternative charset, e.t. "AltGr-8" is needed for "[") On Sat, 7 Dec 2002 18:31:48 +0800 wrote Andy Sy <andy@xxxxxxxxxxx>: > > #C+Up > > control keycode 103 = F112 > > string F112 = "\033[^A" ... > it turns out that one should embed a real control-A > not a two character ^A in the quoted string above. > The action number assigned doesn't seem to matter. > > But the string defined in keydefs.sl that corresponds > to the action is composed of 2 characters and not a > real ctrl-A. What's going on?!? The jed functions definekey, setkey, and local_setkey translate some character combinations in order to facilitate the usage: "\e" -> "?", "\t" -> " ", "^A"..."^Z" -> ""..."" As the keybord driver in Linux doesnot do this, you need the real control-chars there. (You can use jed's quoted_insert() function (usually bound to Key "`") to insert the "real" control-chars.) > 1) Why doesn't TAB do anything? What does Help->Show_Key tell you it is bound to? > 2) How do we make TAB and SHIFT-TAB indent/undent > a highlighted region? Bind it to indent_region_or_line(). (See attached cuamisc.sl) > 3) multi-step redo mapped to ^Y and not ^G^Z. See beginnin of this letter. > I'm not sure what the recommended CUA combo for > exiting/closing is? It's CTRL-Q in the submitted > cua.sl, but I've seen CTRL-W used in a lot of > programs as well. AFAIK, ^W closes the buffer/window and ^Q closes the application. (LyX does it so, Opera and KDE as well.) > Guenter Milde said on 2002-02-19: > > > My favourite would be a jed startup script, that loads > > the "jed-enhanced" keybindings just before opening jed > > and unloads them on exit. (I just wonder what will happen > > to apps in another console.) > > Dang you're right. Is there a way to have your cake > and eat it too? i.e. ensure that Shift-PgUp/PgDn give > the CUA behaviour under jed in one VC and yet maintain > its normal Linux behaviour in the others? I feare it is not. However, as long as you do not too heavy changes to the keymap, and do not have a jed running all the time alongside a VT you "really use", loosing the scroll feature might be tolerable. Actually, I have written the script and it works but there might be a security hole, as it must be suid root in order to be able to change the keymap and the start jed as a normal user. > Is key remapping really the best way to get jed to > do proper CUA? In no ways! The best way is using xjed, where all the keybindings in keydefs.sl work out of the box. (And further bindings can be achived by x_set_keysym) Furthermore, xjed has a far better way of mouse-handling, that can be made more cua-ish by my cuamouse.sl mode (still unpublished, available on request) Mfg Günter Milde -- Milde at ife.et.tu-dresden.de
Attachment:
cua.sl
Description: Binary data
Attachment:
cua.hlp
Description: Binary data
Attachment:
cuamisc.sl
Description: Binary data