[Idle-dev] C-k and C-y keybinding
Kurt B. Kaiser
kbk at shore.net
Mon Oct 16 05:35:20 CEST 2006
"Tal Einat" <taleinat at gmail.com> writes:
> So, first and foremost - does anyone know how to overcome the Text
> widget's default binding for Ctrl+k?
Simply use the Options / Configure IDLE / Keys dialog to rebind Ctrl+k
to a new event you will define. That will shadow Tk's kill binding, so
long as you end your method with 'return "break"' so the Ctrl-k won't
get passed to Tk.
Then implement a method in EditorWindow to select from the insertion
point to the end of the line and call EditorWindow.cut() (or copy that
code :) to get it into the clipboard.
Should work. Send me a patch :-)
More information about the IDLE-dev