Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

HID/Extended input devices (MS Natural Keyboard 4000 etc.)


  • Please log in to reply
44 replies to this topic
Philister
  • Members
  • 57 posts
  • Last active: Sep 27 2016 08:10 PM
  • Joined: 12 Feb 2012
The scripts in this thread need only be used to capture special keys that standard keyboards don't have. However, it seems you are trying to assign hotkeys to ordinary keys. Look up the topic "hotkeys" in the Autohotkey help file to see if that's what you're trying to do. If it isn't: what special keys on what brand of keyboard are you trying to change?

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006

If it isn't: what special keys on what brand of keyboard are you trying to change?

I want to distinguish among 6 different QWERTY keyboards, attached to the same laptop. You can take any key press as an example, for example F1, or A. For different devices I want to assign then different actions/reactions.

Then I can use those 6 devices, for real-time parallel game playing, for six players. For example some form of speed-typing-game. Who writes faster correct strings will win. I posted also some horse-race kind of ideas in this forum. See my few posts before.

Here one example output:
pressing a on laptops original QWERTY:
HND 65635 KBD ScanCode 30 VKey 65 Msg 256
HND 65635 KBD ScanCode 30 VKey 65 Msg 257

pressing a on first attached usb QWERTY:
HND 65639 KBD ScanCode 30 VKey 65 Msg 256
HND 65639 KBD ScanCode 30 VKey 65 Msg 257

pressing a on second attached ps2-to-usb IBM QWERTY:
HND 200738541 KBD ScanCode 30 VKey 65 Msg 256
HND 200738541 KBD ScanCode 30 VKey 65 Msg 257
We can see the handle is the only difference. Now for a three-player-scenario, I would like to start a one-minute-timer and let them type some strings/words/trigrams, and give each player a score based on speed minus made-errors. Plus some real-time horse-race visualization, as a future addon.

Philister
  • Members
  • 57 posts
  • Last active: Sep 27 2016 08:10 PM
  • Joined: 12 Feb 2012
Maybe check out this post:
http://www.autohotke...pic.php?t=59884

mr_pollock
  • Members
  • 3 posts
  • Last active: Oct 18 2011 09:59 PM
  • Joined: 07 Jul 2007
How can I get Shaun's original second script to send Home and End instead of scrolling up and down?

I changed the following section and it works in Firefox, but I'm trying to get it to work in all the other applications...do I have to create a section like the one below for other applications?

Thanks for any help--

Loop 3 {
   if (ScrollDir = 1)
   {
      if (IsMozilla)
         SendInput, {Home}
      else
         SendMessage, 0x115, 0, 0, %fcontrol%, A
   }
   else
   {
      if (IsMozilla)
         SendInput, {End}
      else
         SendMessage, 0x115, 1, 0, %fcontrol%, A
   }
}


Philister
  • Members
  • 57 posts
  • Last active: Sep 27 2016 08:10 PM
  • Joined: 12 Feb 2012
Just change it to:

Loop 3 {
   if (ScrollDir = 1)
         SendInput, {Home}
   else
         SendInput, {End}
}

Or did you mean ^{Home} / ^{End} ?

mr_pollock
  • Members
  • 3 posts
  • Last active: Oct 18 2011 09:59 PM
  • Joined: 07 Jul 2007

Just change it to:

Loop 3 {
   if (ScrollDir = 1)
         SendInput, {Home}
   else
         SendInput, {End}
}

Or did you mean ^{Home} / ^{End} ?


Nope, I meant {Home} and {End} like you showed--thanks! It works great.

deanfield
  • Members
  • 4 posts
  • Last active: Dec 12 2012 12:37 PM
  • Joined: 04 Oct 2012
Hi, everyone. I am quite new to auto hotkey. I just know some very basic script.
I really want to remap the "eject" key of my apple wireless keyboard to "delete" .
After I using shaun's script, I capture the eject key of apple wireless keyboard as follows:

HND 131195 HID Size 2 Count 1 Ptr 28436116
Input 1108
HND 131195 HID Size 2 Count 1 Ptr 28436116
Input 1100

Does anyone can kindly tell me how to do next to remap the eject key to delete? I really appreciate! Thanks!!!

chessonly
  • Members
  • 36 posts
  • Last active: Apr 13 2018 04:03 AM
  • Joined: 06 Feb 2005

Hey

I have a microsoft 2000 keyboard, but I get "There are 0 raw input devices" . With the posted script.. any help ?



chromax
  • Members
  • 7 posts
  • Last active: Jul 03 2017 02:04 PM
  • Joined: 17 Jan 2013

I don´t want to kill the whole fun of capturing exotic keys and writing scripts, but I found a comfortable way without headscratching. The little tool hotkeyp captures pressed keys easily and you can do nearly everything with it (remap, macros, run apps). The apple keyboard eject key is the only one thats not found ;-)

 

http://petr.lastovic...ers.html#hotkey



Philister
  • Members
  • 57 posts
  • Last active: Sep 27 2016 08:10 PM
  • Joined: 12 Feb 2012

Chromax,

 

This thread is about remapping non-standard keys on USB keyboards that are not captured by the operating system's default methods. The tool you pointed to (a poor man's version of AHK's hotkey functionality) does *not* address any of the issues discussed here.



rhr
  • Members
  • 217 posts
  • Last active: Feb 13 2015 02:41 AM
  • Joined: 28 Jun 2012

I don't understand and tired

 

my keyboard is Microsoft® Digital Media Pro Keyboard

 

I copy Shaun's first script, I run it... dialog box said "There are 0 raw input devices", I click "capture" same "There are 0 raw input devices", I touch keyboard, dialog box snow nothing/empty.. I don't understand

 

second Shaun's script

 

I saw manger device keybaord is usage = 6, usage page = 1, I already replace it on script, but dailog bosx said "Failed to register for Nalural Keyboard"

 

I don't understand, help me?????


ЯHR

 

 

 

 

 


rhr
  • Members
  • 217 posts
  • Last active: Feb 13 2015 02:41 AM
  • Joined: 28 Jun 2012

http://www.autohotke...f-input-device/

 

it is working for me! but Shaun's script won't work, how fix?


ЯHR

 

 

 

 

 


rhr
  • Members
  • 217 posts
  • Last active: Feb 13 2015 02:41 AM
  • Joined: 28 Jun 2012

I try and found because my OS is 64-bits

 

Shaun's first script (ListHID) and replace

 

Before

SizeofRawInputDeviceList := 8

After

SizeofRawInputDeviceList := 8 + A_PtrSize

 

top of message list device are working but bottom message won'twork

any fix for 64-bits, I try it


ЯHR

 

 

 

 

 


Zoc
  • Members
  • 2 posts
  • Last active: Apr 23 2015 08:35 PM
  • Joined: 23 Apr 2015

Hello,

 

I have updated this script to support 64 bits windows.

It's not perfect, and further improvements are welcome.

 

You can download it here: https://gist.github....3aa9a9922b21fbf

 

Please note, if you're willing to develop anything and is willing to use this as a base, please consider using this one: http://www.autohotke...-hid-functions/

 

It's far cleaner and better documented. I used it to help me to fix this script.

I did it because I'm inexperienced with AutoHotkey and I was willing to use a remmaper to the Eject Key to Apple Wireless Keyboard.

You can check that script either at it's original post ( http://www.autohotke...ject-to-delete/) or as another Gist on github ( https://gist.github.com/TheZoc/a913642e9bedf62ba3ef )

 

I hope this saves a day for someone who needs these but aren't experienced in AutoHotkey :)



StructureDr
  • New members
  • 1 posts
  • Last active: Sep 09 2015 02:46 AM
  • Joined: 09 Sep 2015

Hello,

 

I have updated this script to support 64 bits windows.

It's not perfect, and further improvements are welcome.

 

You can download it here: https://gist.github....3aa9a9922b21fbf

 

Please note, if you're willing to develop anything and is willing to use this as a base, please consider using this one: http://www.autohotke...-hid-functions/

 

It's far cleaner and better documented. I used it to help me to fix this script.

I did it because I'm inexperienced with AutoHotkey and I was willing to use a remmaper to the Eject Key to Apple Wireless Keyboard.

You can check that script either at it's original post ( http://www.autohotke...ject-to-delete/) or as another Gist on github ( https://gist.github.com/TheZoc/a913642e9bedf62ba3ef )

 

I hope this saves a day for someone who needs these but aren't experienced in AutoHotkey :)

 

Thank you so much!!!  This has saved the day and let me ditch MS Mouse and Keyboard - especially helpful as M&K centre does not play nice with Mouse without Borders.

 

Thanks again