Page 1 of 1

How to make new menu item register with keyboard shortcut?

Posted: Fri Jan 22, 2016 3:21 am
by nghiaho12
Hi,

I'm trying to add some extra editing features under the "Edit" menu. The feature works but doesn't appear in Settings -> Keyboard Shortcuts. What do I have do to?

Nghia

Re: How to make new menu item register with keyboard shortcu

Posted: Fri Jan 22, 2016 11:51 am
by eranif
You should edit the file

Code: Select all

Runtime/config/accelerators.conf.default
and add the new entry there, for example:

Code: Select all

ID_QUICK_ADD_NEXT|Search::Find and Replace|Quick Add Next|Ctrl-K
The line splitted into four, separated by '|'
The first part, is the menu entry ID (in the code, CodeLite uses it like this XRCID("ID_QUICK_ADD_NEXT")
The second part, the menu path. In this example, the menu entry is located under: Search->Find And Replace
The third part, is the menu entry name
The fourth path, is the keyboard shortcut

HTH,
Eran

Re: How to make new menu item register with keyboard shortcu

Posted: Sat Jan 23, 2016 12:49 pm
by nghiaho12
Turns out I had to refresh the list by clicking the Defaults button for it to appear.