Hi, I'm finishing up a search gui-plugin and would like to bind <ctrl-backspace> to delete the word to the left of the insertion character inside an entry widget. Any tcl/tk wizards have a solution on how to do this?
If so, it would also be handy inside the find dialog...
-Jonathan
Looking forward to an update on your search plugin, its already really good.
I think that the Tk text widget has all of this stuff built into it. Then you just need to lock it down a bit to act like a Tk entry.
.hc
On Jun 9, 2011, at 11:42 PM, Jonathan Wilkes wrote:
Hi, I'm finishing up a search gui-plugin and would like to bind <ctrl-backspace> to delete the word to the left of the insertion character inside an entry widget. Any tcl/tk wizards have a solution on how to do this?
If so, it would also be handy inside the find dialog...
-Jonathan
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
----------------------------------------------------------------------------
¡El pueblo unido jamás será vencido!
--- On Fri, 6/10/11, Hans-Christoph Steiner hans@at.or.at wrote:
From: Hans-Christoph Steiner hans@at.or.at Subject: Re: [PD-dev] control backspace inside tk entry To: "Jonathan Wilkes" jancsika@yahoo.com Cc: "pd-dev" pd-dev@iem.at Date: Friday, June 10, 2011, 6:07 AM
Looking forward to an update on your search plugin, its already really good.
I think that the Tk text widget has all of this stuff built into it. Then you just need to lock it down a bit to act like a Tk entry.
From http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm (under "Bindings"):
"[29] Meta-backspace and Meta-Delete delete the word to the left of the insertion cursor."
Unfortunately I don't seem to have a "Meta" key anywhere on my keyboard. Tried <ctrl>-delete, <alt>-delete, <fn>-delete, <Super>-delete, finally tried <ctrl>-<alt>-delete then logged in again. (Oops.)
I'm already using a combobox instead of an entry widget (to get a drop-down history), and I have a feeling it would be a royal pain to get the text widget to act like a combobox.
What's worse is that these default bindings don't seem to exist for entry. Evidently no one who uses tk needs to delete whole words unless there are multiple lines...
-Jonathan
.hc
On Jun 9, 2011, at 11:42 PM, Jonathan Wilkes wrote:
Hi, I'm finishing up a search
gui-plugin and would like to bind <ctrl-backspace> to delete the word to the left of the insertion character inside an entry widget. Any tcl/tk wizards have a solution on how to do this?
If so, it would also be handy inside the find
dialog...
-Jonathan
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
¡El pueblo unido jamás será vencido!
On Jun 10, 2011, at 2:03 AM, Jonathan Wilkes wrote:
--- On Fri, 6/10/11, Hans-Christoph Steiner hans@at.or.at wrote:
From: Hans-Christoph Steiner hans@at.or.at Subject: Re: [PD-dev] control backspace inside tk entry To: "Jonathan Wilkes" jancsika@yahoo.com Cc: "pd-dev" pd-dev@iem.at Date: Friday, June 10, 2011, 6:07 AM
Looking forward to an update on your search plugin, its already really good.
I think that the Tk text widget has all of this stuff built into it. Then you just need to lock it down a bit to act like a Tk entry.
From http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm (under "Bindings"):
"[29] Meta-backspace and Meta-Delete delete the word to the left of the insertion cursor."
Unfortunately I don't seem to have a "Meta" key anywhere on my keyboard. Tried <ctrl>-delete, <alt>-delete, <fn>-delete, <Super>-delete, finally tried <ctrl>-<alt>-delete then logged in again. (Oops.)
I'm already using a combobox instead of an entry widget (to get a drop-down history), and I have a feeling it would be a royal pain to get the text widget to act like a combobox.
What's worse is that these default bindings don't seem to exist for entry. Evidently no one who uses tk needs to delete whole words unless there are multiple lines...
The other thing to check is whether the ttk entry supports those bindings. ttk is included in Tcl/Tk 8.5. The puredata 0.43 Debian/ Ubuntu/Mint package uses 8.5, and Pd-extended uses 8.5.
.hc
----------------------------------------------------------------------------
If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it. - Thomas Jefferson
--- On Fri, 6/10/11, Hans-Christoph Steiner hans@at.or.at wrote:
From: Hans-Christoph Steiner hans@at.or.at Subject: Re: [PD-dev] control backspace inside tk entry To: "Jonathan Wilkes" jancsika@yahoo.com Cc: "pd-dev" pd-dev@iem.at Date: Friday, June 10, 2011, 6:03 PM
On Jun 10, 2011, at 2:03 AM, Jonathan Wilkes wrote:
--- On Fri, 6/10/11, Hans-Christoph Steiner hans@at.or.at
wrote:
From: Hans-Christoph Steiner hans@at.or.at Subject: Re: [PD-dev] control backspace inside tk
entry
To: "Jonathan Wilkes" jancsika@yahoo.com Cc: "pd-dev" pd-dev@iem.at Date: Friday, June 10, 2011, 6:07 AM
Looking forward to an update on your search
plugin, its
already really good.
I think that the Tk text widget has all of this
stuff built
into it. Then you just need to lock it down
a bit to
act like a Tk entry.
From http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm (under
"Bindings"):
"[29] Meta-backspace and Meta-Delete delete the
word to the left of the insertion cursor."
Unfortunately I don't seem to have a "Meta" key
anywhere on my keyboard.
Tried <ctrl>-delete, <alt>-delete,
<fn>-delete, <Super>-delete, finally
tried <ctrl>-<alt>-delete then logged in
again. (Oops.)
I'm already using a combobox instead of an entry
widget (to get a
drop-down history), and I have a feeling it would be a
royal pain to
get the text widget to act like a combobox.
What's worse is that these default bindings don't seem
to exist for
entry. Evidently no one who uses tk needs to
delete whole words unless
there are multiple lines...
The other thing to check is whether the ttk entry supports those bindings. ttk is included in Tcl/Tk 8.5. The puredata 0.43 Debian/Ubuntu/Mint package uses 8.5, and Pd-extended uses 8.5.
It's not listed as a default binding. Is using <ctrl>-<delete> to clear the word to the left of the insertion point a relatively new standard or something?
.hc
If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it. - Thomas Jefferson