On 9/27/06, David MacKay <[EMAIL PROTECTED]> wrote:
[snip]
in IDLE with unix-like keybinding,
C-k successfully kills the line, but does not put it into
the cut-buffer, so C-y does not retrieve the killed object.

How can I modify IDLE to that C-k is the correct "kill and
put in the cut/paste buffer"?
 
I tried to achieve this recently, and discovered that IDLE ignores configurations for Ctrl+k. Ctrl+k kills a line in IDLE no matter which key bindings you use, since this is a default key binding of Tkinter's Text widget which is used by IDLE.
 
What would need to be done is to disable/override the Text widget's default key binding - I don't know how to do this, I tried a bit but failed. With this done, we would need to bind Ctrl+k to a new "kill line" function, which removes the current line and puts it into the clipboard. This could implement Emacs-like behavior, where subsequent lines killed are added to the clipboard instead of replacing it.
 
So, first and foremost - does anyone know how to overcome the Text widget's default binding for Ctrl+k?

-- And another question:   I see that "C-w" is "cut";
but how can I create and extend the region to be cut, using
just the keyboard?  In emacs, we use C-SPACE then C-w
to set mark and cut region.   Is there an equivalent to
C-SPACE in idle?
 
Press and hold down SHIFT, move the cursor to the other end of the region you wish to select, release SHIFT. (This is quite standard and works in most text-editing apps.)

Thanks very much
 
HTH :)
(sorry for the delayed response, I was on vacation)
_______________________________________________
IDLE-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/idle-dev

Reply via email to