Left/Right Simulated Keys

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links or images until they have at least 4 posts.
Post Reply
Jon Lee
New User
Posts: 7
Joined: Tue Sep 08, 2009 4:59 pm

Left/Right Simulated Keys

Post by Jon Lee » Sun Sep 13, 2009 8:10 am

Hey Phil,

I've ditched SetPoint and started using XMouse regularly but have found a quirk with the {LEFT}, {RIGHT}, {UP}, {DOWN}, {HOME}, {END}, {INSERT}, {DELETE}, {PGUP}, {PGDN} simulated keystrokes. When I use these tags I can only get they keypad versions of them. How do I simulate the "regular" keys that are not on the number pad? I assumed that the number pad equivalents would have tags like {NUM_LEFT}, {NUM_HOME}, etc. like the others: {NUM+}, {NUM5}, etc. but they don't appear to.

Even though they have the same name they have different scan codes and are considered different keys. Is there a way of simulating them that I'm missing? It's late and perhaps I'm just having a brain fart. Please let me know.

Thanks! Cheers, -Jon.

User avatar
phil
Site Admin
Posts: 5922
Joined: Sun Apr 06, 2003 11:12 pm

Re: Left/Right Simulated Keys

Post by phil » Sun Sep 13, 2009 11:56 am

Thats an interesting one, I can only find the following virtual keys defined

#define VK_PRIOR 0x21
#define VK_NEXT 0x22
#define VK_END 0x23
#define VK_HOME 0x24
#define VK_LEFT 0x25
#define VK_UP 0x26
#define VK_RIGHT 0x27
#define VK_DOWN 0x28

which is what I use for these keys.
The number pad defined keys only include the numbers there does not appear to be a left/right type list. Im not sure but I guess I have to do something else to distinguish between these. I will try and figure it out.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Jon Lee
New User
Posts: 7
Joined: Tue Sep 08, 2009 4:59 pm

Re: Left/Right Simulated Keys

Post by Jon Lee » Sun Sep 13, 2009 3:48 pm

Hmm... I see what you mean. I just looked up the virtual key codes and see that there is only one listing for HOME/UP/etc. and don't seem to have a different listing for the keypad and non-keypad version of the same function.

Maybe to do this you'd need to work on the hardware scan-code level rather than the driver virtual-key level? I haven't had more than a cursory look into it and (for me anyway) it's not critical at this point but just something I noticed when using XMouse with Call of Duty:

Because the tilt wheel is often unsupported, I map it to LEFT ARROW and RIGHT ARROW so that I can use it in games. When my existing CoD control map didn't work with XMouse, I saw when redefining that CoD sees XMouse's {LEFT} as "KP LEFT ARROW" and not just "LEFT ARROW" (which is how I had it with SetPoint earlier).

However, unless there is a program where *functionally* KP_LEFT != LEFT etc. (I can't think of one except games where it's easy to remap anyway) I don't think it's a big deal and wouldn't worry about it. One less thing for the todo list ;-) But, it's probably good to be aware of in case an issue pops up in the future with another user or something.

Cheers! -Jon.

Davidc
New User
Posts: 9
Joined: Fri Sep 25, 2009 5:30 pm

Re: Left/Right Simulated Keys

Post by Davidc » Fri Sep 25, 2009 5:36 pm

Yep, in Vista 64 I have to switch off Numlock in order to generate keystrokes for the cursor keys. While not a huge problem it's a bit of a problem that hopefully you'll be able to solve.

Thanks for the program. It's leagues better than Setpoint.

Davidc
New User
Posts: 9
Joined: Fri Sep 25, 2009 5:30 pm

Re: Left/Right Simulated Keys

Post by Davidc » Fri Sep 25, 2009 6:00 pm

Solved this one by sending {numlock} before and after the cursor key.

Post Reply