Menubar accelerator issue

Hi,

I’m trying to use an accelerator with ‘ALT’ key on an MenuItem but it doesn’t work. I’m using accelerators with ‘CTRL’ key with the form CTRL+<letter> or CTRL+<number>, also I’m using function keys as accelerators (F1 - F12) and they work fine.

What I’m trying to do with ‘ALT’ key is something like original menubar of servoy smart client, it has two MenuItems, “Previous Record” and “Next Record”, with accelerators ALT+UP and ALT+DOWN respectively, but I cannot get this to work on my own menu, which replace servoy’s at startup. And I’d like to use ‘ALT’ key for “First Record” and “Last Record” with ALT+HOME and ALT+END accelerators.

I’ve tried with CTRL+<arrows, home, end> and it doesn’t work either. I also watched the “servoy_wizard_menubar.servoy” solution included with servoy, copy and paste the examples of item.set function and nothing.

I’m using servoy 4.1.4 - build 681 on Windows Vista.

I submitted a ticket in it2be support page but they said this plugin is part of servoy since version 4 so they can’t give me support for this, that’s why I’m asking for any help here.

This is an example of my code:

var _menu = plugins.menubar.addMenu();
var _item = _menu.addItem();

// This doesn't work
_item.set('Next Record', globals.NextRecord, null, 'media:///next_icon.png', 'ALT RIGHT', 'N');

// This works fine, but "CTRL N" is for example
_item.set('Next Record', globals.NextRecord, null, 'media:///next_icon.png', 'CTRL N', 'N');

Thanks in advance.

Danny,

I guess this should work, but we would need to investigate.
Please create a case in our support system.

viewtopic.php?f=8&t=6062

Rob

DannyC:
Hi,

I’m trying to use an accelerator with ‘ALT’ key on an MenuItem but it doesn’t work. I’m using accelerators with ‘CTRL’ key with the form CTRL+<letter> or CTRL+<number>, also I’m using function keys as accelerators (F1 - F12) and they work fine.

What I’m trying to do with ‘ALT’ key is something like original menubar of servoy smart client, it has two MenuItems, “Previous Record” and “Next Record”, with accelerators ALT+UP and ALT+DOWN respectively, but I cannot get this to work on my own menu, which replace servoy’s at startup. And I’d like to use ‘ALT’ key for “First Record” and “Last Record” with ALT+HOME and ALT+END accelerators.

I’ve tried with CTRL+<arrows, home, end> and it doesn’t work either. I also watched the “servoy_wizard_menubar.servoy” solution included with servoy, copy and paste the examples of item.set function and nothing.

I’m using servoy 4.1.4 - build 681 on Windows Vista.

I submitted a ticket in it2be support page but they said this plugin is part of servoy since version 4 so they can’t give me support for this, that’s why I’m asking for any help here.

This is an example of my code:

var _menu = plugins.menubar.addMenu();

var _item = _menu.addItem();

// This doesn’t work
_item.set(‘Next Record’, globals.NextRecord, null, ‘media:///next_icon.png’, ‘ALT RIGHT’, ‘N’);

// This works fine, but “CTRL N” is for example
_item.set(‘Next Record’, globals.NextRecord, null, ‘media:///next_icon.png’, ‘CTRL N’, ‘N’);




Thanks in advance.

This works ok if you use the right syntax:

‘control HOME’ or ‘control RIGHT’ or ‘alt END’ …

for accelerator. Note the strings are case sensitive.