key event

hi all,

what is the way to know when a key is pressed and released in photon?

i wish to change the set status of a PtButton to copy the pressed status of
a specific key.

i try to use for each PtButton i wish to change, either a HotKey callback, a
Filtered callback, and a raw callback, but seems they work only on the
focused widget.


tnks
donCiccio

If you want to mean you want to catch a key event anywere in Photon
space, you will have to create a region and place it covering all of
Photon space. If you mean that you simply want to catch key events
within your Photon application on buttons, you can simply set you Hotkey
callback you want on the button but if you want the button to give the
apperence you clicked on the button you will have to set the resources
manually.

Regards,
Dave B.


donCiccio wrote:

hi all,

what is the way to know when a key is pressed and released in photon?

i wish to change the set status of a PtButton to copy the pressed status of
a specific key.

i try to use for each PtButton i wish to change, either a HotKey callback, a
Filtered callback, and a raw callback, but seems they work only on the
focused widget.


tnks
donCiccio

“Apps” <apps@qnx.com> ha scritto nel messaggio
news:3CD216D4.2050105@qnx.com

If you want to mean you want to catch a key event anywere in Photon
space, you will have to create a region and place it covering all of
Photon space. If you mean that you simply want to catch key events
within your Photon application on buttons, you can simply set you Hotkey
callback you want on the button but if you want the button to give the
apperence you clicked on the button you will have to set the resources
manually.

Hotkey callback aren’t called in release button event.

after some test i used a filtered event callback of the main window, in
which i force the resurce of the other widget related to the key
pressed/released.

thnk
donCiccio