Post Reply  Post Thread 
Assign macro to keyboard key?
Author Message
Brian B
Junior Member
**


Posts: 7
Group: Registered
Joined: Sep 2008
Status: Offline
Reputation: 0
Post: #1
Assign macro to keyboard key?

I know that to assign a macro to the mouse button, I use the IDI Device configurator and click on the button and select the macro to execute. But with a keyboard, this is not on the device configurator so how do I specify that a key will have a specific macro? It appears that I have to use the GetKeyboardStatesHid() function and specify the key to wait for, but this still doesn't help me load it into the configurator. Is there a way to load a generic macro into the configurator without assigning it to a particular mouse button? I'm new to this...

10-06-2008 01:50 PM
Find all posts by this user Quote this message in a reply
Guest
Unregistered


Post: #2
RE: Assign macro to keyboard key?

Currently, you have to assign a macro to a button (either Omnimouse or Fragpedal) to get it active and working while you use the configuration. Even though the macro might, like in your case, just set up keyboard keys with macros, it has to be assigned to a button. Buttons are where you "hang" macros, even macros that don't have anything to do with a button. For instance the Wiggle scroll macro just uses mouse movement to scroll it doesnt use a button, especially the one its assigned to.
SO. the trick is to set up your configuration so you have enough button assignments to "hang" all the macros you want to use. The trick with the Omnimouse is use a Shift button to create an alternate button setting for each button, and use the shifted set to assign the macros for the keyboard and so on. You lose one button for the Shift function, but you gain 7 more (the shifted settings minus the button used for the shift + Lift. You can assign a different macro to each lift event of each shift state. You never actually use the Shift button, but the macros on the shifted buttons will all just work (assuming they are keyboard macros).
The trick with the Fragpedal is to use the virtual buttons to host the macros that setup keyboard keys with macros.
Another thing to keep these keyboard macros small in number is to use functions like the WaitForKeys4 and 8. These functions can wait on 4 or 8 keys, effectively giving you 4 or 8 macros in one.
There is a sample macro in the new macro pack that you can test this with. Its called ToggleKey I think. Assign it to a button, and it just makes one of the keyboard keys into a toggle key. Its an example of a macro that has nothing to do with the button you hang it on, its for a keyboard function.

10-07-2008 06:42 PM
Quote this message in a reply
Guest
Unregistered


Post: #3
RE: Assign macro to keyboard key?

This really helps a lot. It's great that you can use the shift buttons to add the code to button combinations that will never get used.

10-08-2008 12:30 PM
Quote this message in a reply
Post Reply  Post Thread 

[-]
Quick Reply
Message
Type your reply to this message here.



Image Verification
Image Verification Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:

Forum Jump: