Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If Key problem. Remap keys to mouse move/click.
I'm trying to remap my keyboard if you'd say, without having to restart my computer and mess with the registry. :?

I want to be able to turn the 'remap' on and off.

Here's what I have

Copy      Help
,,key N2
,,key N5
I don't care if it types both F and 2 at the same time because I am using mousekeys, so it doesn't type anything anyways.

The problem is that it is confusing the number 2 above the key W with the Numberpad 2 above 0 on the right side of the keyboard.

I've tried..


and all seem to be doing the same, Just typing the number 5 instead of actually pressing the key 5

What it should do is move the mouse slightly down and not even type a number.

Any help would be appreciated! Big Grin
Function remap_keyboard_LL_hook2
Copy      Help
;Run this function to turn on remapping. Run again to turn off.

function nCode wParam KBDLLHOOKSTRUCT&h

,if(getopt(nthreads)>1) shutdown -6 0 "remap_keyboard_LL_hook2"; ret
,int- t_keyhook
,t_keyhook=SetWindowsHookEx(WH_KEYBOARD_LL &remap_keyboard_LL_hook2 _hinst 0)

;---- this code runs on each key down and up event -----

;FormatKeyString h.vkCode 0 &_s
;out "%s %s%s" _s iif(h.flags&LLKHF_UP "up" "down") iif(h.flags&LLKHF_INJECTED ", injected" "")

,if h.flags&LLKHF_UP=0
,,sel h.vkCode
,,,case 'F' mou+ 0 1; ret 1 ;;2
,,,case 'D' lef; ret 1 ;;5
,,sel h.vkCode
,,,case ['F','D'] ret 1

ret CallNextHookEx(t_keyhook nCode wParam &h)

Works with or without Mouse Keys.

Forum Jump:

Users browsing this thread: 1 Guest(s)