How do you add additional keybindings for incremental search

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Charles W. Hooks
Avatar
I have successfully figure out how to implement keyBinds a couple different ways, currently I am looking to provide different key binds for existign commands, like incremental search. I am having a hard time finding an object from incremental search that I can use...

The following example I found work greate for a couple of things and I've used key press events for others...

editor.CommandLinks.Add(new CommandLink(new CopyToClipboardCommand(),
new KeyBinding(ActiproSoftware.WinUICore.Input.ModifierKeys.Control, Keys.C)));

I must be missing something obvious on how to add additional key maps for existing commands...

Comments (4)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Charles,

SyntaxEditor has these defined by default:
new CommandLink(new IncrementalSearchCommand(), new KeyBinding(WinUICore.Input.ModifierKeys.Control, Keys.I))
new CommandLink(new ReverseIncrementalSearchCommand(), new KeyBinding(WinUICore.Input.ModifierKeys.ControlShift, Keys.I))
To add additional keys, just add more CommandLinks, one for each additional key binding.


Actipro Software Support

Posted 17 years ago by Charles W. Hooks
Avatar
Ah! I was finding IncrementalSearch() was in my path and was gettign errors...

Thanks
Posted 17 years ago by Charles W. Hooks
Avatar
new CommandLink(new ReverseIncrementalSearchCommand(), new KeyBinding(WinUICore.Input.ModifierKeys.ControlShift, Keys.I))

This key binding does not work. If I change the I to an N, it does work.

CTRL-SHIFT-I does not work when I exclude this binding, yet the commands demo shows it existing as a default command.

I can not find any conflicts with this key binding either... Looks like there might be a bug with this keybinding.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I've noticed that happen too. I believe something in Windows is catching particular key combination because when I write debug messages on SyntaxEditor.OnKeyDown, that method is never called for Ctrl+Shift+I whereas it is for every other key. None of our key logic kicks in until after the point I write those debug messages too so it shouldn't be anything that is in the SyntaxEditor code that is doing it.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.