Home Notices Documents Classes Download Others Rice
Classes  >  domkeyeventargs  >  KeyCode
domkeyeventargs class : KeyCode getter

Description

Gets a key code representing the pressed key.

Syntax

domkeyeventargsInstance.KeyCode

Arguments

None

Return value

ClassDescription
intA key code representing the pressed key.

Sample code

1:

open method void anyHandler(domkeyeventargs dkea)

2:

...

3:

int code = dkea.KeyCode;

4:

...

5:

endmethod

Notes

KeyDown event :

The corresponding key code is returned.

KeyPress event :

If the character that outputs with pressed key is displayable, 0 is returned. If the character is not displayable, The corresponding key code is returned.

KeyUp event :

The corresponding key code is returned.

Links for reference

None

Copyright © Rice All rights reserved.