Hi,
I'm trying to add a shortcut key to a PopupMenu with PMIA_CommKey.
The shortcut is well displayed but have no effect.
Is something special to add to handle a shortcut ?
Thank you by advance for your help.
[Solved] PopupMenu and PMIA_CommKey ?
[Solved] PopupMenu and PMIA_CommKey ?
Last edited by zzd10h on Mon Nov 02, 2015 9:23 pm, edited 1 time in total.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: PopupMenu and PMIA_CommKey ?
Are you using the hook or PM_HANDLEINPUT ?
I think from scanning the autodocs you need the latter for keyboard short cuts. Never having used it I can't help more.
I think from scanning the autodocs you need the latter for keyboard short cuts. Never having used it I can't help more.
Re: PopupMenu and PMIA_CommKey ?
Thank you for your help.
I use the the handler like in the PopupMenu SDK example.
Like I don't know how to use PM_HANDLEINPUT, I simply use WMHI_RAWKEY in my window event loop to trap IEQUALIFIER_RCOMMAND and the key code and it works
I wondered if it was possible to do it easy like in NewMenu and MenuClass shortcuts.
I use the the handler like in the PopupMenu SDK example.
Like I don't know how to use PM_HANDLEINPUT, I simply use WMHI_RAWKEY in my window event loop to trap IEQUALIFIER_RCOMMAND and the key code and it works
I wondered if it was possible to do it easy like in NewMenu and MenuClass shortcuts.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: [Solved] PopupMenu and PMIA_CommKey ?
AFAIK the shortcuts displayed on context menus are for information only. They are never trapped, you need to do it yourself (or add a corresponding item to the main menu strip). Intuition context menus work the same way (except the display of the shortcut doesn't work).
Re: [Solved] PopupMenu and PMIA_CommKey ?
@Chris
Thank you, as I wrote in the previous post, I did it myself.
Thank you, as I wrote in the previous post, I did it myself.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE