One of the clients of the company I work for required a client that was predominantly keyboard based to enable them to perform batch processing. This wasn’t a problem as netBake has similar functionality to enable fast entry of Orders, etc.
Whilst the client was evaluating the latest build of the client, she noticed that hot keys shortcuts were available on all the buttons. When she tried to use them however, an annoying behaviour was observed.
We use 3rd party controls from Janus to emulate the Office 2007 ribbon bar from Microsoft, and so we are not blaming Janus as the original controls have the same behaviour. The <Alt> key is handled differently when using the Ribbon bar.
When the <Alt> key is pressed and released, the Ribbon bar waits for the second key press that calls the desired command. If, after pressing the <Alt> key is pressed, no other key is pressed, the only way to clear the <Alt> key is to press it again.
Originally, the <Alt> key behaviour only lasted as long as the <Alt> key was held down.
If when using the Ribbon bar control, you activate a standard hot key command, e.g., a button; you will not be able to perform another hot key command until the <Alt> key is pressed and released.
Obviously a pain the arse.
I’ve found a partial way round it below:
private void MainView_KeyUp(object sender, KeyEventArgs e)
{
// Stops the Janus Ribbon Bar from capturing the
if (e.Alt) { SendKeys.SendWait("%"); }
}
The above is the KeyUp event handler on the form. The SendWait() method programmatically sends a key press to the application and waits for the message to be processed.
February 20th, 2008