AutoHotkey Community

It is currently May 27th, 2012, 11:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Strange problem
PostPosted: November 8th, 2005, 2:07 am 
Im have a Sound Blaster Audigy 4 with remote. The remote is a Creative RM-1500. Within the Creative directory there is a directory housing '.key' files. These files, and specifically Default.key convert the key presses of the remote controll to decimal microsoft 'Virtual-Key Codes'.

My problem is that when I look in the key history of a script it dosn't show the right key. I know it is the correct key because it does what it's supposed to do.

Here is an excerpt from the Default.key file
    [KeyEvent6951]
    KeyName=Down
    Notification=-1
    KeyEventRemap=40
The KeyEventRemap is decimal microsoft 'Virtual-Key Codes'
See: http://msdn.microsoft.com/library/defau ... yCodes.asp for the different codes.

This is what the key hist shows.
    28 050 d 2.13 Num 2
    28 050 u 0.14 Num 2


It is interesting to note that while it says Im pressing Num 2, the cursor moves down one space. (Like its supposed to)

What is also strange is that Num 2 is supposed to be decimal 50, and yet it displayes 50 in the hexadecimal slot. Especially since 28 is the hex conversion of the decimal number 40 (the original decimal number).

Would sombody explain to a poor noob what my system is doing.

Crimsondestroyer@hotmail.com


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 2:34 am 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
You seem to be mixing virtual and scan codes, and hexadecimal and decimal notation. Also, both columns, VK and SC, are displayed with hexadecimal notation. Consider this:

(I believe the 9th bit position indicates an extended key)

VK_DOWN (DOWN ARROW key)
virtual code = 0x28 (40)
scan code = 0x150

VK_NUMPAD2 (Numeric keypad 2 key)
virtual code = 0x62 (98)
scan code = 0x50 (80)

Code:
SetFormat, Integer, Hex

MsgBox, % DllCall( "MapVirtualKey", "uint", 0x28, "uint", 0 )
MsgBox, % DllCall( "MapVirtualKey", "uint", 0x62, "uint", 0 )


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group