Re: [[gnomemm] Key Events]
- From: Murray Cumming <murrayc usa net>
- To: Deepak Chandran <deepakc dpsl net>, gnomemm-list <gnomemm-list gnome org>
- Subject: Re: [[gnomemm] Key Events]
- Date: Mon, 24 Feb 2003 08:08:48 -0000
Why not use the normal gtkmm or gnomemm accelerator key systems?
Deepak Chandran <DeepakC dpsl net> wrote:
> Hi!!
>
> We are developing an application in gnome-mm.
> The application needs to allow user to operate it using key combinations.
> We are providing the user "CTRL" + Key combinations for various operations
>
> *****Attached is the code snippet for the same**************
>
> bool window::on_key_press(GdkEventKey* key)
> {
> if (( key->keyval == GDK_E || key->keyval == GDK_e)
> && ( key->state == GDK_CONTROL_MASK ))
> {
> /* IF CTLR + e / CTLR + E perform required operation*/
> }
> }
> **************************************************
>
> When we execute the above code, it works fine.
> But when "Num Lock" is ON, the above "if" condition fails.
>
> We found that when the "Num Lock" is activated, the "key->state" is
> incremented by a factor of 16. This increment is not consistent for all the
> keys.
> This is causing a problem for as we are not able to find if the Num Lock is
> activated or not.
> And If activated what is the key->state behaviour for various keys.
>
> Is there some way to get the "key->state" irrespective of the Num Lock key
> state ?
>
> Hoping for a positive response!
>
> thanks & regards
> Deepak
>
> _______________________________________________
> gnomemm-list mailing list
> gnomemm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnomemm-list
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]