tags:

views:

75

answers:

1

In my code, I have messy things like

// Enter key
if (args.Event.KeyValue == 65293)
    ...

Is there any Enum I can use for this, instead of hard-coding the values?

+4  A: 

Yes: Gdk.Key in the gdk-sharp.dll assembly.

if (args.Event.KeyValue == Gdk.Key.Return) {
   ...
}
Gonzalo