background image

9

Key Number Mode Examples

Generation of keystrokes on the target computer is done through 
the  sending of special one byte codes to the USBtoUSB Com Port 
when in the Key Number Mode.

Each standard key of the computer keyboard is assigned a “make” 
code to emulate the press of a key, and a “break” code, which 
results in the release of the key.  The Key Number Table on page 
7 lists each of the supported keys and their corresponding make 
and break codes.

From the keycode table, the value of 

2

 (0x02) can be sent to the 

Com Port on the unit to generate the “make” or press and hold 
of  the  “1”  key  on  the  target  computer.    Sending  a  byte  to  the 
USBtoUSB Com Port with a value of 

130

 (0x82) will result in the 

release of the “1” key on the target computer. 

Important:

  For any key that has been previously sent a “make” 

code, a “break” code of that key must be sent at a later time.  
Failure to send the corresponding break code will leave the key 
in  the  down  state  on  the  target  computer,  which  may  result  in 
unintended keystrokes when new actions are sent.  The last key 
left in the make state without a break will generally repeat until 
the break code is sent.  Never command more than 60 keys in 
the “make” state at the same time as this will exceed the standard 
USB protocol keyboard buffer length for the USBtoUSB device.

The use of make and break codes allows the user to create virtu-
ally any keystroke combination.  For example, if a sequence of 
CTRL+ALT+F1 was needed, the following decimal codes would 
be sent; 

58

 (Make L Ctrl), 

60

 (Make L Alt), 

112

 (Make F1), 

240

 

(Break F1), 

188

 (Break L Alt), 

186

 (Break L Ctrl).  Note that the 

values shown in the example are the decimal values of a single 
byte to be sent for each of the key actions for make and break.

Producing Mouse Action on the Target PC

The USBtoUSB is capable of controlling the mouse cursor and mouse 
button states of the target computer through a special six byte command 
sequence.  This same command sequence sent to the Com Port of the 
USBtoUSB can be used in any of the operating modes.

The six byte mouse control sequence is construced as follows:
Byte#1   Byte#2    Byte#3    Byte#4    Byte#5      Byte#6
 [Start]   [X PosMS] [X PosLS] [Y PosMS] [Y PosLS]  [Scroll/Buttons]

Byte #1 - Always a 0x00 value, indicates start of packet.

Byte #2 & #3 - A two byte value which dictates the X axis position 
of the mouse cursor on the screen.  A value of 0 will send the 
cursor  to  the  leftmost  screen  position.    Byte  #2  is  the  Most 
Siginificant (MS) byte of the X position value, and Byte #3 is the 
Least Significant (LS) part of the X position value.

Byte #4 & #5 - A two byte value which dicatates the Y axis position 
of the mouse cursor on the screen.  A value of 0 will send the 
cursor to the top of the screen.  Byte #4 is the MS byte of the Y 
position value, and Byte #5 is the LS part of the Y position value.

Byte #6 - Byte for Scroll Wheel movement and mouse button
control.  The upper 4 bits of this byte contain a signed value for 
scroll wheel movement, while the lower 3 bits command the mouse 
Left, Right, and Middle button activation and deactivation.

This Byte #6 is constructed as shown,
     Bit 7    Bit 6    Bit 5    Bit 4    Bit 3    Bit 2    Bit 1   Bit 0
     [Ws]    [W2]    [W1]   [W0]     [1]     [MM]    [MR]   [ML]
[Ws] - The sign of the scroll wheel movement.  A zero in this bit 
commands  up  movement  on  the  scroll  wheel,  a  one  in  this  bit 
produces  down  scroll  wheel  movement.  Movement  magnitude 
based on the signed value in Ws through W0 values.

10

Summary of Contents for USBtoUSB

Page 1: ...oll Free 888 690 9080 Phone 540 465 4677 Fax 540 465 4678 Monday through Friday 8 00 am to 5 00 pm EST sales hagstromelectronics com www hagstromelectronics com 1986 Junction Road Strasburg VA 22657 C...

Page 2: ...rn in of your USBtoUSB to ensure its performance If you have any questions please send us an email or give us a call Support is available Monday through Friday 8 00 am to 5 00 pm EST customer service...

Page 3: ...SB Com Port Protocol 19200 8 N 1 USBtoUSB Specifications USBtoUSB Connections Using the included USB cables attach the Com Port USB connector to the computer that will be sending commands to the USBto...

Page 4: ...s sent to the USB Com Port in this mode a capital A character will be produced as a keystroke on the target computer s USB port ASCII characters sent to the Com Port which are out of the 0x00 to 0x7F...

Page 5: ...he target computer when processed by the USBtoUSB unit Extended ASCII Mode The USBtoUSB Extended ASCII Mode of operation allows for the standard ASCII character set values 0x00 to 0x7F and an extended...

Page 6: ...173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF nb Space none 192 193 194 1...

Page 7: ...time a make is done for a key a corresponding break release of that key must be done at a later time to deactivate it The break code for a key is the same value as the make code plus 0x80 The break c...

Page 8: ...o the Com Port on the USBtoUSB to generate keystrokes at the target computer in Key Number Mode use the values shown above to produce the desired make and break actions for the corresponding key 12 Wh...

Page 9: ...On 2 Off On Off 3 Off On On 4 On Off Off 5 On Off On 6 On On Off 7 On On On 11 W2 The most significant bit of the scroll wheel movement magnitude W1 Bit 1 of the three bit value for scroll wheel move...

Page 10: ...Note that the values shown in the example are the decimal values of a single byte to be sent for each of the key actions for make and break Producing Mouse Action on the Target PC The USBtoUSB is cap...

Page 11: ...Note that the values shown in the example are the decimal values of a single byte to be sent for each of the key actions for make and break Producing Mouse Action on the Target PC The USBtoUSB is cap...

Page 12: ...On 2 Off On Off 3 Off On On 4 On Off Off 5 On Off On 6 On On Off 7 On On On 11 W2 The most significant bit of the scroll wheel movement magnitude W1 Bit 1 of the three bit value for scroll wheel move...

Page 13: ...o the Com Port on the USBtoUSB to generate keystrokes at the target computer in Key Number Mode use the values shown above to produce the desired make and break actions for the corresponding key 12 Wh...

Page 14: ...time a make is done for a key a corresponding break release of that key must be done at a later time to deactivate it The break code for a key is the same value as the make code plus 0x80 The break c...

Page 15: ...173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF nb Space none 192 193 194 1...

Page 16: ...he target computer when processed by the USBtoUSB unit Extended ASCII Mode The USBtoUSB Extended ASCII Mode of operation allows for the standard ASCII character set values 0x00 to 0x7F and an extended...

Page 17: ...s sent to the USB Com Port in this mode a capital A character will be produced as a keystroke on the target computer s USB port ASCII characters sent to the Com Port which are out of the 0x00 to 0x7F...

Page 18: ...SB Com Port Protocol 19200 8 N 1 USBtoUSB Specifications USBtoUSB Connections Using the included USB cables attach the Com Port USB connector to the computer that will be sending commands to the USBto...

Page 19: ...rn in of your USBtoUSB to ensure its performance If you have any questions please send us an email or give us a call Support is available Monday through Friday 8 00 am to 5 00 pm EST customer service...

Page 20: ...oll Free 888 690 9080 Phone 540 465 4677 Fax 540 465 4678 Monday through Friday 8 00 am to 5 00 pm EST sales hagstromelectronics com www hagstromelectronics com 1986 Junction Road Strasburg VA 22657 C...

Reviews: