How to override an existing bindkey ?
Hi,
At work, in the legacy nedit, my bindkey Ctrl+E is used to comment the selected line(s). But in nedit-ng, Ctrl+E is mapped to "Goto Selection". Then, Ctrl+E does not do what I want. Is there a way to remove the Ctrl+E from the "Goto Selection" command ?
Regards.
Xuo.
Ah good question. Right now the accelerators are hard coded but I have plans to change this to be based on a config file. So The current answer is unfortunately a source coded change which isn't ideal for you.
Hello,
If you tell me which file to modify, I can try. I've asked IT people at my work to install nedit-ng. I can provide them the modified source files.
Regards.
Xuo.
I think that you can get away with just editing MainWindow.ui and changing this part:
<action name="action_Goto_Selected">
<property name="text">
<string>&Goto Selected</string>
</property>
<property name="shortcut">
<string>Ctrl+E</string>
</property>
</action>
And you can set the Ctrl+E to basically any other shortcut that isn't already occupied.
Thank you. I'll try this.
Regards.
Xuo.
Hi,
I need again your help as I don't know what to write to replace the "action_Goto_Selected" if I want to map the "Comment" action to the Ctrl+E bindkey. In other words, there is no "action_Comment_The_Line" command.
Regards.
Xuo.
Oh, well if you're trying to assign a macro/shell command shortcut it'll have to be a two-step.
First you change action_Goto_Selected's shortcut to anything else (or nothing)
and then separately, you use the UI mechanisms to set the shortcut for your shell/macro command to have whatever shortcut you like.