in reply to Re: Win32::GuiTest IsKeyPressed function
in thread Win32::GuiTest IsKeyPressed function

The wrapper around it *is* doing translation! Here is the table from guitest.xs:
/* Find the virtual keycode (Windows VK_* constants) given a * symbolic name. */ int findvkey(const char* name, int* key) --snip-- "BAC", VK_BACK, "BS" , VK_BACK, "BKS", VK_BACK, "BRE", VK_CANCEL, "CAP", VK_CAPITAL, "DEL", VK_DELETE, "DOW", VK_DOWN, "END", VK_END, "ENT", VK_RETURN, "ESC", VK_ESCAPE, "HEL", VK_HELP, "HOM", VK_HOME, "INS", VK_INSERT, "LEF", VK_LEFT, "NUM", VK_NUMLOCK, "PGD", VK_NEXT, "PGU", VK_PRIOR, "PRT", VK_SNAPSHOT, "RIG", VK_RIGHT, "SCR", VK_SCROLL, "TAB", VK_TAB, "UP", VK_UP, "F1", VK_F1, "F2", VK_F2, "F3", VK_F3, "F4", VK_F4, "F5", VK_F5, "F6", VK_F6, "F7", VK_F7, "F8", VK_F8, "F9", VK_F9, "F10", VK_F10, "F11", VK_F11, "F12", VK_F12, "F13", VK_F13, "F14", VK_F14, "F15", VK_F15, "F16", VK_F16, "F17", VK_F17, "F18", VK_F18, "F19", VK_F19, "F20", VK_F20, "F21", VK_F21, "F22", VK_F22, "F23", VK_F23, "F24", VK_F24, "SPC", VK_SPACE, "SPA", VK_SPACE, "LWI", VK_LWIN, "RWI", VK_RWIN, "APP", VK_APPS,
Update: Hmmm. This should have shown up as a reply to Grandfather's post. Curious...

Replies are listed 'Best First'.
Re^3: Win32::GuiTest IsKeyPressed function
by GrandFather (Saint) on Apr 28, 2006 at 22:56 UTC

    Is there a reason that these codes are not documented in the module documentation?

    Is there a reason that the MicroSoft codes are not used?

    Is there a reason that the symbolic names are not the same as the MicroSoft symbolic names?

    Why do keys such as 'A' not work?

    Would it not have been simpler to use and document (and possibly also to write the code) to pass an integer value straight through, convert letters to the uppercase equivelent ordinal code and possibly do some symbolic conversion as icing?

    Why is the sample code mentioned in the documentation not provided?


    DWIM is Perl's answer to Gödel