acat icon indicating copy to clipboard operation
acat copied to clipboard

How to connect switch for F12

Open Frankilla77 opened this issue 8 years ago • 15 comments

Hi,

how to connect a switch in order to send the F12 key to ACAT?

A friend of mine has this switch: http://www.auxilia.it/site/lang/it-IT/page/18/product/147

Ideally this USB adapter should work but doesn't allow to send F12: http://www.bjliveat.com/access/usb-switch-interface-2.html

Any suggestion or alternative?

Thanks in advance

Frankilla77 avatar Mar 19 '16 08:03 Frankilla77

Great piece of hardware.

i was reading the documentation and for the USB adapter you can download an extra software to configure the action keys for the switch take a look at the docs: http://downloads.bjliveat.com/manuals/BJ-805/BJ-805_manual_en.pdf

In the 7_ item of the PDF you will see this:

"7_ Other applications If you want to assign different actions to switches you can do it with the software Switch Driver from Sensory Software. You can download it from Sensory Software website: http://www.sensorysoftware.com/downloads/Swit chDriver4.zip"

Im making my own switch as are cheaper starting to use old keyboards and mouses in combination with the HotKeys Software its very easy to adapt any middle mouse click to simulate F12 with this you will get a cheaper switch i think :)

For future reference, The HotKeys code will be

MButton::
SetKeyDelay,300
Send {Blind}{F12 DownTemp}
Send {Blind}{F12 Up}

im doing a tutorial series about all i learned tweaking ACAT and making some custom hardware.

If you need more help dont easitate to ask again

nanomo avatar Mar 19 '16 08:03 nanomo

Thank your quick reply and your suggestions, the mouse idea is great.

Now I'm building a low-cost bluetooth switch adaptor by modifying a bluetooth mouse.

For converting middle mouse click to F12 I'm using "X-Mouse Button Control" because I've not found the one you suggested. Anyway it seems to be adequate to my purpose.

Frankilla77 avatar Mar 21 '16 18:03 Frankilla77

@FrancescoGori For the record, AutoHotkeys can be downloaded from: https://autohotkey.com/

download and install, then start the program, it will stay in the status bar near the clock, then create a file called acat.ahk and pase the code:

MButton::
SetKeyDelay,300
Send {Blind}{F12 DownTemp}
Send {Blind}{F12 Up}


With that you are emulating F12 key press when the person click the middle button of the mouse, its the cheapest way to use acat :D, im running a donation campaing in my town to collect mouse and keyboard and make cheaper switchs 

nanomo avatar Apr 19 '16 21:04 nanomo

Easy To build with an Arduino Leonardo set as an usb keyboard!

tchilaviek avatar Apr 20 '16 09:04 tchilaviek

@nanomo Yeah, I did it and it's working fine, thanks for the macro.

Also, AutoHotkeys allow to generate a .exe implementing defined macros, very easy to launch and move. Note that on Windows 7 I had to execute it with administrator role in order to send translated key to ACAT.

Frankilla77 avatar Apr 24 '16 11:04 Frankilla77

I think that the main advantage in modifying a mouse is that it's trivial to:

  • find a mouse, also bluetooth. Limiting new wires may be relevant if the user already has "hardware" on him
  • install. Basically any mouse is fully compatible with any OS and doesn't require additional drivers
  • modify it for the switch, if you have a minimum of competencies
  • explain to someone that doesn't have technical competencies how to use it

Frankilla77 avatar Apr 24 '16 11:04 Frankilla77

Hello everybody! I'm testing Arduino Pro micro, keyboard simulation is running in windows, but ACAT is not recognized F12. I changed Actuators ID value with the Arduino GUID, but also without success.

Any idea ?

"Google Translate" :D

MarceloTomaz avatar Apr 25 '16 02:04 MarceloTomaz

New release of ACAT (v0.99) is now available here with new features and enhancements. There is a link to the Troubleshooting guide there which has instructions on changing the default trigger key from F12 to another function key. Thanks Sai

saiprasadb01 avatar Jul 01 '16 20:07 saiprasadb01

I could send F12 using Arduino Leonardo, using this circuit https://www.arduino.cc/en/Tutorial/KeyboardMessage and this code:

const int buttonPin = 4;
int previousButtonState = HIGH;

void setup() {
  pinMode(buttonPin, INPUT);  
  pinMode(13, OUTPUT);
  Keyboard.begin();
}

void loop() {
  int buttonState = digitalRead(buttonPin);
  if ((buttonState != previousButtonState)
      && (buttonState == HIGH)) 
  {    
    digitalWrite(13, HIGH);   // turn the LED on 
    Keyboard.press(KEY_F12);
    delay(100);
    Keyboard.releaseAll();
    digitalWrite(13, LOW);    // turn the LED off
  }
  delay(100);
  previousButtonState = buttonState;
}

``

chicobjr avatar Nov 05 '16 14:11 chicobjr

By using ATtiny85 USB something like:

DigiKeyboard.sendKeyStroke(KEY_F12);

Cheaper!

alexandre-mbm avatar Nov 09 '16 19:11 alexandre-mbm

Hi @FrancescoGori,

I'm trying to use X-mouse button control as well, it works perfectly everywhere but not on the Talk App of ACAT (I use the same configuration than yours : middle button simulate F12). When I use the F12 of my keyboard, it works, but not with the mouse.

Could you describe your settings please ?

Thanks !

maeldd avatar Jan 05 '17 12:01 maeldd

@maeldd

Install Hotkey software, then create a file with notepad and paste this inside:

MButton:: SetKeyDelay,300 Send {Blind}{F12 DownTemp} Send {Blind}{F12 Up}

save the file with ahk extension, ex.: keyBinding.ahk and then double click to make HotKey catch and execute the events

nanomo avatar Jan 05 '17 13:01 nanomo

@nanomo thanks !

I found X-mouse simpler at first but its way to function was a bit strange so I switched to Hotkey. But I didn't write exactly the same script as yours :

MButton::F12

it seems to work well but what are the advantage of yours ?

maeldd avatar Jan 05 '17 15:01 maeldd

im making a set of low cost switch, sometime in the test some switch keep turned on, to avoid a false positive i set a delay in the key stroke :), both alternative works mine adds a delay for those reasons

nanomo avatar Jan 05 '17 15:01 nanomo

@nanomo, if your set uses a AVR microntroller, you should program a debounce for it. Se http://blog.vidadesilicio.com.br/arduino/basico/botoes/ for more info.

alexandre-mbm avatar Jan 06 '17 18:01 alexandre-mbm