Win32 globalhook keylogger, why are the number keys not consecutive?

  • Thread starter NotASmurf
  • Start date
In summary, The conversation discusses the use of a globalhook to capture keyboard keys and the resulting ASCII values for the keys 1-9. However, the actual logger shows non-consecutive values for the numbers. It is suggested that the values may be incorrect due to them being keyboard scan codes rather than ASCII codes.
  • #1
NotASmurf
150
2
I'm using a globalhook into the keyboard for key capture, if I look up the ascii values for the keys 1-9, I see 48-57.
Now the actual logger shows

480
491
502
513
524
535
546
557
568

Sure, maybe it's ascii, maybe its because they're not numpad keys, but regardless, why are the numbers not consecutive?

Any help appreciated.
 
Technology news on Phys.org
  • #2
Are you sure you're printing them out right? Is it possible you're printing out the value concatenated with the array index or something?
 
  • #3
nope, if I type a, it prints 65, so that's fine (although it's weird that it uses uppercase notation for lowercase charecters), although left and right shift are `160 and 161 respectively. When it should be 15 in ascii.
 

1. Why are the number keys not consecutive?

The number keys are not consecutive because the Win32 globalhook keylogger is designed to capture all keystrokes, including those from special keys such as function keys, arrow keys, and the Windows key. These keys are assigned specific codes and are not considered part of the consecutive number keys.

2. Can the keylogger be configured to only capture consecutive number keys?

No, the Win32 globalhook keylogger is programmed to capture all keystrokes by default. It cannot be configured to only capture consecutive number keys.

3. Why is it important for a keylogger to capture non-consecutive number keys?

Capturing non-consecutive number keys allows the keylogger to provide a more comprehensive record of all keyboard activity. This can be useful for monitoring and tracking user behavior, as well as for security purposes.

4. Will the non-consecutive number keys affect the accuracy of the captured data?

No, the non-consecutive number keys will not affect the accuracy of the captured data. The keylogger is designed to capture the exact keystrokes entered by the user, regardless of the key's code or position on the keyboard.

5. Can the keylogger be modified to exclude non-consecutive number keys?

Yes, the keylogger's code can be modified to exclude specific keys, including non-consecutive number keys. However, this would require advanced programming skills and should only be done with the consent of the computer's owner.

Similar threads

  • Programming and Computer Science
2
Replies
41
Views
4K
  • Programming and Computer Science
Replies
9
Views
1K
Back
Top