Author Topic: Changing keyboard shortcuts?  (Read 7974 times)

null

  • Guest
Changing keyboard shortcuts?
« on: October 08, 2005, 03:58:47 am »
Is it possible to configure keyboard shortcuts in C::B? If not, is this going to be in a future release? I keep hitting shortcuts from other IDEs out of reflex in C::B and causing unintended things to happen. I like to customize my shortcuts because I am obsessive-compulsive. :lol:

PS: The only RFE's along this vein are:
http://sourceforge.net/tracker/index.php?func=detail&aid=1236771&group_id=126998&atid=707419
http://sourceforge.net/tracker/index.php?func=detail&aid=1183839&group_id=126998&atid=707419

If there isn't some sort of keyboard shortcut customization feature included, planned, or pending for C::B, I'll add an RFE for such. Because I do so like RFE's. :P
« Last Edit: October 08, 2005, 04:04:38 am by null »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Changing keyboard shortcuts?
« Reply #1 on: October 08, 2005, 04:42:33 am »
What you want is kinda requested in the last link. I don't really think it'd be that hard to implement given the wxWidgets facilities for it, but it'd take a large amount of time to do so.

Some ppl is working in translations for Code::Blocks and this feature should be implemented before that's done (the translations).

It'll be surely considered after Code::Blocks 1.0 is released and would be nice if somebody already begins implementing it.

Offline drac

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Changing keyboard shortcuts?
« Reply #2 on: October 12, 2005, 12:58:35 am »
It would be nice to have possibility to choose between more keyboard shortcuts schemes.

I would like a Visual Studio keybinding schema. In order for C::B to be useful (for me at least) it should have this! If C::B wants to be used by
professionals then please don't make them use the mouse to get things doneĀ  :D

Please have a look at SlickEdit (http://slickedit.com). SlickEdit gives you the ability to change between keyboard schemes... please learn
from others.

C::B can fill a niche in my C++ toolset, it can switch from different compilers and it can work on multiple platforms...

Keep up the good work.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Changing keyboard shortcuts?
« Reply #3 on: October 12, 2005, 04:54:22 am »
Hey hey... it's not like we're not doing it ok? :) we're already planning on it... , but right now we have to fix one or two huge bugs so we can release the next version. We'll add the keyboard shortcuts after version 1.0.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Changing keyboard shortcuts?
« Reply #4 on: October 12, 2005, 10:56:48 am »
Please have a look at SlickEdit (http://slickedit.com). SlickEdit gives you the ability to change between keyboard schemes... please learn from others.

Don't learn too much, though.  :lol:
The page neither displays properly in Firefox, nor in Opera if your browser window is less than 900 pixels wide. The PDF spec sheet is quite funny, too - all text goes into one block without formatting or illustrations whatsoever. Luckily, they make the PDF inaccessible with Javascript ;)

The first 10 seconds are the most important for a customer's impression. After reading through lots of blah blah for 2 minutes, I still have not figured why I should spend money to buy this editor instead of using one that is free.

Oh, and the quote "Comparing SlickEdit to an editor is is like calling the F-16 a single seat airplane." is a really a bummer. Pride was the first sin committed.  :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: Changing keyboard shortcuts?
« Reply #5 on: October 12, 2005, 11:19:28 am »


Here's my duplicate of the RFE: http://sourceforge.net/tracker/index.php?func=detail&aid=1201652&group_id=126998&atid=707419

If you want to know where to start, there is a project in wxCode called Keybinder (using wxWidgets) with the only purpose of adding keyboard shortcuts to your program.

Please look here http://wxcode.sourceforge.net/components/keybinder/

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Changing keyboard shortcuts?
« Reply #6 on: October 12, 2005, 11:59:41 am »
Looks interesting, that one (though the site showed me a 404, but google had it cached). Wonder how hard it is to incorporate, as it seems you need to modify your wxApp and it uses a lot of custom stuff, too. Do you have experience using it?

On a different thought, it would be great if this could be wrapped into a plugin instead. Then it should not be too hard to do it without changing anything to the main program.
If only I knew how to get keyboard events from inside a plugin... EVT_KEY_DOWN and EVT_CHAR don't do.
Plugins have access to the menu bar, so one could read out the elements, their titles and their repective message IDs, display the titles in a list and have the user assign keys to them. Save that in a std::map, and when a key event comes in, post a menu event instead.
Sounds easy enough, except I have no clue how to get to a key event when the message is not handed down.
« Last Edit: October 12, 2005, 12:01:28 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Changing keyboard shortcuts?
« Reply #7 on: October 12, 2005, 12:10:03 pm »
This is the component we plan on using (when time permits ;) ).
It will be bound between the SDK and the main app (somehow) and the SDK will provide some additional functions for the plugins to call. Something along the lines of:

Code
RegisterKeyboardShortcut(int id, const wxString& shortcut);
UnregisterKeyboardShortcutFor(int id);

But we don't have time for this until after 1.0 is released. If anyone wants to tackle this and provide a patch, he is welcome to do so ;)
Be patient!
This bug will be fixed soon...