How to rebind the default tkd GUI keybinds?

tastyminerals tastyminerals at
Sat Oct 17 09:33:04 UTC 2020

On Sunday, 11 October 2020 at 18:51:17 UTC, tastyminerals wrote:
> Tk default keys are somewhat different from what we used to use 
> for selecting, copying and pasting the text. So, any Tk based 
> GUI app starts with writing the rebinding function for 
> "ctrl+a", "ctrl+c", "ctrl+x" and "ctrl+v" keys, at least. I did 
> it when writing TkInter based apps in Python. Today I am trying 
> out tkd and want to do the same. However, it doesn't work :(
> For example:
> private void selectText(CommandArgs args) {
>     this._clientId.selectText;
> }
> this._loginFrame = new Frame(2, ReliefStyle.groove);
> this._clientId = new Entry(loginFrame).grid(1, 0);
> this._clientId.bind("<Control-a>", &selectText);
> It works if I change "<Control-a>" to "<Control-o>" for example.
> But how do I overwrite the actual "<Control-a>" key in tkd?

So, this is even tricky in Python TkInter but possible.
In tkd this is not possible unfortunately.

More information about the Digitalmars-d-learn mailing list