|
| Key are not running on main window. |
| Iniciado por c.curtis, 19,feb. 2015 17:47 - 4 respuestas |
| |
| | | |
|
| |
Miembro registrado 18 mensajes |
|
| Publicado el 19,febrero 2015 - 17:47 |
I have working key press code already. It detects the enter key and performs code.
Now I want to add universal hot keys as in F1. I don't know how to do this, other than adding code(procedure) to each window's keydown, keyup, or keypress events. I started with my main window, but I can't not get any of the 6 key events to fire. None of these events fire, help! My main window has a menu, a dashboard control, and two image buttons. Thoughts?
Events on main window that do not run: Key pressed, key up, key down, System key pressed, System key up, System key down |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 18 mensajes |
|
| Publicado el 19,febrero 2015 - 23:21 |
I have concluded that the key events are not firing because of the dashboard control that is in my main window. There are no key events for a dashboard control.
Is this a bug? Am I missing something? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,febrero 2015 - 10:53 |
Hello Clint
the easiest way to do that is to add button using that hotkey as a shortcut. The buttons do not need to be visible by the user (in fact, they often sit on the left of the window, where they can be activey can be active without being in the middle of your UI. IN their click code, you can call whatever action you want
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
NEW: WXReplication, your open source replication system is available on my web site!!! WXShowroom.com: Show your projects! More information on http://www.fabriceharari.com
On 2/19/2015 11:47 AM, c.curtis wrote:
I have working key press code already. It detects the enter key and performs code.
Now I want to add universal hot keys as in F1. I don't know how to do this, other than adding code(procedure) to each window's keydown, keyup, or keypress events. I started with my main window, but I can't not get any of the 6 key events to fire. None of these events fire, help! My main window has a menu, a dashboard control, and two image buttons. Thoughts?
Events on main window that do not run: Key pressed, key up, key down, System key pressed, System key up, System key down |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 18 mensajes |
|
| Publicado el 20,febrero 2015 - 17:04 |
Well that was easy. And I learned how easy hot key functionality can be. Much thanks!
Any chance a more global solution exists or may be added in for version 20/21? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 20,febrero 2015 - 19:06 |
I'm not sure what you call a more global solution, but there are several other ways of doing that:
- activating the onkeypressed code area in the window and using keypressed to know what key is pressed - using the event function to intercept the keystrokes - Using some API hook ....
In any case, why kill a fly with a cannon?
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
NEW: WXReplication, your open source replication system is available on my web site!!! WXShowroom.com: Show your projects! More information on http://www.fabriceharari.com
On 2/20/2015 11:04 AM, c.curtis wrote:
Well that was easy. And I learned how easy hot key functionality can be. Much thanks!
Any chance a more global solution exists or may be added in for version 20/21? |
| |
| |
| | | |
|
| | | | |
| | |
|