I have a Window with ButtonBar and XBrowse. No menu.
How can I perform some operations on Alt+<Key> shortcuts?
I need to do both Alt+<letter> and Alt+<F_key>
Thank you.
Catch Alt+Key combinations
Re: Catch Alt+Key combinations
Use SetKey and inside de setkey function verify:
Code: Select all
SetKey( VK_F2, {||Shortcut()} )
Procedure Shortcut()
If GetKeyState(VK_SHIFT) // Shift
? "Shift+F2"
end
If GetKeyState(VK_CONTROL) // CTRL
? "Ctrl+F2"
end
If GetKeyState(VK_MENU) // Alt
? "Alt+F2"
end
return
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
Re: Catch Alt+Key combinations
Code: Select all
...
If GetKeyState(VK_MENU) // Alt
? "Alt+F2"
end
..
Also I have some Alt+<Letter> shortcuts that should work on given window.
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Catch Alt+Key combinations
It does not appear that you can trap the <alt> key .. oDlg:bKeyDown seems to ignore returning a value for <alt> .. <ALT> key combinations are routed to Windows controls like <alt+f4> for a windows 'close'
I recommend changing your key routines to <shift>+key
Rick Lipkin
I recommend changing your key routines to <shift>+key
Rick Lipkin