PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
WD Detecting the keystrokes
Published by Boller
in the category Tools
New features



Description
WD Detecting the keystrokes


PROCEDURE MyWindow()

gaaPosXKey, gaaPosYKey are arrays associatifs of int
_InitKeyPos()

CONSTANT
// Constants for specific keys
cnNumLock = 0x90
cnScrollLock = 0x91
cnCapsLock = 0x14
cnAltGr = 0xA5

// Names given to the keys
csTABKey = "<TAB>"
csEnterKey = "<ENTER>"
csNumLockKey = "<NUM_LOCK>"
csCapsLockKey = "<CAPS_LOCK>"
csScrollLockKey = "<SCROLL_LOCK>"
csPauseKey = "<PAUSE>"
csWindowsKey1 = "<WINDOWS_1>"
csWindowsKey2 = "<WINDOWS_2>"
csAltGrKey = "<ALT_GR>"
csRightClickKey = "<RIGHT_CLICK>"
csEscKey = "<ESC>"
csSpaceKey = "<SPACE>"
csDeleteKey = "<DELETE>"
csControlKey = "<CTRL>"
csShiftKey = "<SHIFT>"

csLeftArrowKey = "<LEFT_ARROW>"
csRightArrowKey = "<RIGHT_ARROW>"
csUpArrowKey = "<UP_ARROW>"
csDownArrowKey = "<DOWN_ARROW>"

csInsertKey = "<INSERT>"
csHomeKey = "<HOME>"
csPageUpKey = "<PAGE_UP>"
csPageDownKey = "<PAGE_DOWN>"
csDelKey = "<DEL>"
csEndKey = "<END>"

csDivisionKey = "</>"
csMultiplicationKey = "<*>"
csMinusKey = "<->"
csPlusKey = "<+>"

csAmpersandKey = "&"
csEAcuteAccentKey = "é"
csQuotationMarkKey = """"
csQuoteKey = "'"
csLeftParenthesisKey = "("
csMinusKeyBis = "-"
csEGraveAccentKey = "è"
csUnderscoreKey ="_"
csCCedillaKey = "ç"
csAAcuteAccentKey = "à"
csRightParenthesisKey = ")"
csEqualKey = "="
csPlusKeyBis = "+"
csATKey = "@"
csSquareKey = "²"
csDegreeKey = "°"
csDieresisKey = "¨"
csPoundKey = "£"
csDollarKey = "$"
csAsteriskKey = "¤"
csPercentageKey = "%"
csUAccentKey = "ù"

csTildeKey = "~"
csNumberSignKey = "#"
csLeftCurlyBraceKey = "{"
csLeftSquareBracketKey = "["
csMoreKey = "|"
csApostropheKey = "`"
csBackslashKey = "\"
csCircumflexKey = "^"
csCommercialAtKey = "@"
csRightSquareBracketKey = "]"
csRightCurlyBraceKey = "}"

csGreaterThanKey = ">"
csLessThanKey = "<"
csCommaKey = "<,>"
csQuestionMarkKey = "<?>"
csSemicolonKey = "<;>"
csPeriodKey = "<.>"
csSlashKey = "</>"
csColonKey = "<:>"
csExclamationMarkKey = "<!>"
csChapterKey = "<§>"
csMuKey = "<µ>"
csMultiplicationKeyBis = "<*>"


csUnknownKey = "<UNKNOWN>"
csInactiveKey = "<DISABLED>"
END


// Position of the keyboard lights
LightImage_NumLock..X = 611+Image1..X-10
LightImage_NumLock..Y = 28+Image1..Y-10

LightImage_CapsLock..X = 631+Image1..X-10
LightImage_CapsLock..Y = 28+Image1..Y-10

LightImage_ScrollLock..X = 651+Image1..X-10
LightImage_ScrollLock..Y = 28+Image1..Y-10




dStartDrawing(Image1)

// Display the lights
MarkLights(cnCapsLock,bActiveKey(cnCapsLock))
MarkLights(cnScrollLock,bActiveKey(cnScrollLock))
MarkLights(cnNumLock,bActiveKey(cnNumLock))




















Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!