Home UserCP Memberlist Register Calendar FAQ
Home

Go Back   Official TouchBuddy Forum > Support > How do I... ?
Register FAQDonate Members List Calendar Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Display Modes
program ALT or CONTROL or SHIFT commands?
Old 01-13-2007, 01:50 AM   #1 (permalink)
Junky
 
Join Date: Jul 2006
Location: Vladivostok
Posts: 75
Ripcord is on a distinguished road
Default program ALT or CONTROL or SHIFT commands?

Sorry, but I wasn't able to make this work.

What would be the way to enter ALT F1, for instance?

Ripcord
Ripcord is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 08:33 AM   #2 (permalink)
Creator
 
Join Date: May 2006
Location: Cambridge, UK
Posts: 1,612
zorlac is on a distinguished road
Default

There are three way to do this:

"normal" macros - easiest to create, but least likely to work
"rawkey" macros - will work, but can be fiddly
"predef" macros - the most reliable way of them working.

So, I`ll show the predef macros way of doing it. Firstly, a quick "system keyboard events" primer.

When any key is pressed, it creates two events that the system sees. Firstly, it will see a key-down event when the key is pressed, and secondly it will create a key-up event when the key is released. So, for any key you want to send, the system needs to create two events for it, one down, one up.

This is very important, as if you send a key-down event but forget to also send the key-up event for that key, the keyboard state can get very very upset

Its also very important to know this when you want to be able to press multiple keys at the same time. In your exampel case, you want to press ALT F1. If we break this down into the key events, it looks like this:

ALT key-down
F1 key-down
F1 key-up
ALT key-up

So you are pressing the ALT key down, the the F1 key down, then releasing the F1 key, and finally releasing the ALT key.

Normally yu would enevr have to worry about all this, you just press the keys on the keyboard and it "just happens", but when you need to create these events, you need to understand what is actually going on.

OK, now we have that out of the way, lets show how to create this macro. If you look in the touchbuddy\docs directory for a file called "predef-and-rawkey-reference.html", this shows the list of predef and rawkey events that can be used. In this case, we are just interested in the "PREDEF Name" column.
  • The predef entry for the ALT key is "MENU" or "ALT", so we will stick with "ALT" for now.
  • The predef entry for the F1 key is "F1".

Armed with this, lets create the macros. If these macros are being added to a button type "button" or "toggle", here is what the macro list would look like:

Quote:

macro = predef:ALT, KEYDOWN
macro = predef:F1, KEYDOWN
macro = predef:F1, KEYUP
macro = predef:ALT, KEYUP
As you can see, this is recreating the exact key down and key up events as we worked out above.

I hope this has helped a bit...
__________________


(Setup: XP Pro, classic mode, LinITX 8" touchscreen (Client/Server), 19" touchscreen (Local), latest development version of TouchBuddy)
zorlac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 09:30 AM   #3 (permalink)
Junky
 
Join Date: Jul 2006
Location: Vladivostok
Posts: 75
Ripcord is on a distinguished road
Default

Zorlac, thanks man.

I kinda guessed at this, by analyzing Magnum's profile for F4:AF and then doing some trial and error, but this so much more helpful.

I still need some other keystrokes, like TAB, backspace and all the rest. Is there some kind of reference page or cheat sheet out there that I can download?

Ripcord
Ripcord is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 09:42 AM   #4 (permalink)
Creator
 
Join Date: May 2006
Location: Cambridge, UK
Posts: 1,612
zorlac is on a distinguished road
Default

Look in the touchbuddy\docs directory for a file called "predef-and-rawkey-reference.html" and open it in a web browser. This is the reference guide for all the predef and rawkey macros
__________________


(Setup: XP Pro, classic mode, LinITX 8" touchscreen (Client/Server), 19" touchscreen (Local), latest development version of TouchBuddy)
zorlac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 09:47 AM   #5 (permalink)
Junky
 
Join Date: Jul 2006
Location: Vladivostok
Posts: 75
Ripcord is on a distinguished road
Default

where is that doc directory? couldn't find it today....

Ripcord
Ripcord is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 11:11 AM   #6 (permalink)
Creator
 
Join Date: May 2006
Location: Cambridge, UK
Posts: 1,612
zorlac is on a distinguished road
Default

ah, good find... if you downloaded the "core" build, then it doesnt contain the docs folder (will fix that later today). There is now an online version available here:

http://www.syn-ack.com/touchbuddy/do...reference.html

save this page out locally for reference.
__________________


(Setup: XP Pro, classic mode, LinITX 8" touchscreen (Client/Server), 19" touchscreen (Local), latest development version of TouchBuddy)
zorlac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 06:17 PM   #7 (permalink)
Junky
 
Join Date: Jul 2006
Location: Vladivostok
Posts: 75
Ripcord is on a distinguished road
Default

Perfect. Thanks, Z!

Ripcord
Ripcord is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-13-2007, 08:09 PM   #8 (permalink)
Creator
 
Join Date: May 2006
Location: Cambridge, UK
Posts: 1,612
zorlac is on a distinguished road
Default

the new/fixed/updated core and full downloads (v1.3.0 revision 11) have all the docs and stuff in it now... sorry about that!
__________________


(Setup: XP Pro, classic mode, LinITX 8" touchscreen (Client/Server), 19" touchscreen (Local), latest development version of TouchBuddy)
zorlac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:17 PM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

  www.touch-buddy.com        Archive  


Footer
vBSkinworks Top