I'm not sure where else to post this, so this section seems appropriate.
I've just finished making a plugin for CodeLite and I'm trying to figure out how to make a shortcut for it. I've searched the source for terms like "shortcut" and the plugins code doesn't even seem to do anything special. my plugin doesn't just show up in the keyboard shortcuts dialog automatically, so I'm not sure what to do.
Add to Shortcut menu with custom plugin
- caibbor
- CodeLite Veteran
- Posts: 78
- Joined: Thu Jan 10, 2013 10:37 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
- caibbor
- CodeLite Veteran
- Posts: 78
- Joined: Thu Jan 10, 2013 10:37 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Add to Shortcut menu with custom plugin
after some more digging, it turns out keyboard shortcuts in CodeLite are called "Accelerators"
and they're stored in ~/.config/accelerators.conf
Adding a line is done manually, and manually only, I guess. doing so works.
and they're stored in ~/.config/accelerators.conf
Adding a line is done manually, and manually only, I guess. doing so works.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Add to Shortcut menu with custom plugin
caibbor wrote:after some more digging, it turns out keyboard shortcuts in CodeLite are called "Accelerators"
and they're stored in ~/.config/accelerators.conf
Adding a line is done manually, and manually only, I guess. doing so works.
This is not the correct place for doing this. As this is a user settings which codelite writes into it
Note that overriding your change can easily be done from the UI by clicking on:
Settings -> Keyboard Shortcuts -> Defaults button
The correct way of this it is by making a new file named:
Code: Select all
<my-plugin>.accelerators
and place it under (Linux):
Code: Select all
/usr/lib/codelite/resources/
Code: Select all
CODELITE_INSTALL_DIRECTORY\Plugins\resources
Eran
Make sure you have read the HOW TO POST thread