What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Virtual Key Code

Virtual Key Code
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Virtual Key Code
For extra background info, read this::
CookieRevised's reply to # key and = key

And:
http://msdn.microsoft.com/library/default.asp?url=/library/.../VirtualKeyCodes.asp
http://msdn.microsoft.com/library/default.asp?url=/library/.../wm_appcommand.asp
http://www.microsoft.com/mspress/books/sampchap/6232.asp#120
http://www.microsoft.com/whdc/device/input/w2kbd.mspx#EATAE


Finally, what you need depends on what your programming language returns or can detect, or what your destination app may detect. You have ascii codes, scan codes, key codes and virtual key codes.

This said, when you need to send something like that you do not send a keystroke (eg: <CTRL> <K>; thus 2 codes) but you send the code which makes up that keystroke (eg: <CTRL+K>; thus 1 code). The same goes for that Fn Key. You don't send the code for that, but you send the code of the F4 when Fn is pressed.

So sending 0xFF|0x73 doesn't make much sense (also '255 OR 115' will be 255 anyways). You need to send the keycode of the key F4 when the Fn key is on.

I attached a very crude virtual keycode scanner which I just slammed together. Launch it, toggle your Fn and press F4 and see what the keycode is (requires VB6 runtimes).

---------------

quote:
Originally posted by Dan0208
code:
SendVirtualKeystroke( 0xFF|0x73, true, false, false, false );
can anyone that knows Jscript actually confirm its the right code.
No, as that code is not part of JScript, but it is part of the scripting engine of salling clicker (just as the Interop stuff is part of Plus!'s addition to the JScript engine in Plus!Live).

quote:
Originally posted by Dan0208
....im just not sure what all the true, falses are for.
Isn't that also in the documentation?

Either way, there is the forum for that, search and you'll find (in fact their forum is full of threads with questions like yours) ;)

eg:
http://www.salling.com/forums/viewtopic.php?t=404...ndvirtualkeystroke
http://www.salling.com/forums/viewtopic.php?t=304...ndvirtualkeystroke

quote:
SendVirtualKeystroke(
        virtual keycode value,
        shiftState,
        ctrlState,
        altState,
        winState
);


PS: in the SVKS app the 'shift state' indicates the state of the shift keys. these are Shift, Ctrl and ALT. So don't confuse 'shift state' with the 'shiftState' of the SendVirtualKeystroke function where they actually mean the SHIFT button itself.

.zip File Attachment: SVKS.zip (3.42 KB)
This file has been downloaded 1009 time(s).

This post was edited on 09-24-2006 at 11:50 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-24-2006 10:26 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Virtual Key Code - by Dan0208 on 09-24-2006 at 08:01 AM
RE: Virtual Key Code - by Mike on 09-24-2006 at 08:30 AM
RE: Virtual Key Code - by Dan0208 on 09-24-2006 at 08:52 AM
RE: Virtual Key Code - by CookieRevised on 09-24-2006 at 10:26 AM
RE: Virtual Key Code - by Dan0208 on 09-24-2006 at 11:44 AM
RE: Virtual Key Code - by CookieRevised on 09-24-2006 at 11:45 AM
RE: Virtual Key Code - by Dan0208 on 09-24-2006 at 01:17 PM
RE: Virtual Key Code - by CookieRevised on 09-24-2006 at 02:00 PM
RE: Virtual Key Code - by Dan0208 on 09-24-2006 at 02:19 PM
RE: Virtual Key Code - by CookieRevised on 09-24-2006 at 09:40 PM
RE: Virtual Key Code - by rav0 on 09-25-2006 at 02:42 AM
RE: Virtual Key Code - by Adeptus on 09-25-2006 at 04:32 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On