How to Press 2 keyboard keys at the same time with one button?

Moderator: AdminGroup

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Fri Apr 27, 2018 23:48

Has anybody setup Keyboard buttons to send keys for external apps like Teamspeak, Simple Radio, and Voice Attack?

I have an x55 and don't use a headset, so all the audio comes through my speakers. On my x55 I have a macro that presses down a key to mute speakers and another key for PPT for Teamspeak. The keys stay pressed as long as I keep holding the button.

I cannot figure out how to do this in the VKB Dev Config tool.. :evil: :cry:

(And I don't want to bind joystick buttons to Teamspeak, VoiceAttack, or Mute because I also want to keep my x55 using the same commands. And you cannot bind 2 joysticks to 1 command in some of these apps.) But I can bind 2 keyboard keys, and send them from a button on different joysticks. At least I can do it with my x55...

Image

This seems to be impossible with VKB.

It seems that a Toggle button would work best because it presses and stays pressed util I release it. And it doesn't repeat. But I need to press 2 keys, and it only supports 1 key. And I could press 2 keys using a Macro. Except that a Macro doesn't allow the use of a Toggle button.

And the manual is like a mechanical engineering reference, not a 'user' manual. Very frustrating trying to do simple things. :oops:

** Also, I tried using the Audio item to Mute my speakers, but it doesn't work at all. That would be helpful if it worked.

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Fri Apr 27, 2018 23:55

Show a screenshot from WorldPad that is emulated (happens) when you press and release the button on the X55?
This approach is suitable - pressed - 9 and 4, released - again 9 and 4?
94.png

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 0:06

It's better to use the x55 Text window as it shows the key Presses, Repeats, and key Releases in different colors. Notepad++ doesn't register the Key Release if another key is also repeating.

NOTE: The last 'Alt' keypress was when I pressed Alt+Printscreen for the screenshot. It was not part of the macro.

Image

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Sat Apr 28, 2018 0:19

Let's try so, consistently.I will add in the process.
941.png
942.png
943.png
944.png
946.png


You can, just in case, after pressing Set still click Restart.

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 0:57

Thank you so much for trying to help me! :D :D

On the Macro tab, what does the 'Auto' checkbox do??

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Sat Apr 28, 2018 1:25

Naturally, with another setting and the output will be different.
You're welcome.

9433.png
9444.png
9449.png

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 2:14

Look at these results. It seems to be a 9 press & release, 4 press & release and then again a 9 press & release, 4 press & release.

In VoiceAttack the PPT button is 4. And it sees 2 presses and releases. Not PPT pressed and held down so that I can speak.. :?
The X55 also sees these keystrokes the same way.. press, release, and press, release.

If these keys are not held down(pressed, and later released), then the speakers are not muted, and the PPT does not hear me speak. :(

Image
Last edited by Snacko on Sat Apr 28, 2018 2:25, edited 2 times in total.

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 2:15

And looking at the VBK Keyboard options/settings for sending a keystroke, there are no other options to specify just a press, or just a release... It will always do both press & release quickly. The x55 has the options of setting just a press, or just a release..

Image

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Sat Apr 28, 2018 2:46

Excuse me, but I do not understand. I do not have the X55 software, so I ask you to show what is done in WorldPad (++ notepad) when you press the joystick button. And when released.

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 3:19

x55 notepad.png

Sokol1
Posts: 130
Joined: Thu Jan 07, 2016 20:07
Has thanked: 4 times
Been thanked: 62 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Sokol1 » Sat Apr 28, 2018 3:39

Ron61

Looks like that in your example key 4 is pressed and released 0.005 seconds after - or is just "flashing".

download/file.php?id=5750&mode=view

He need than when press the joy button (#?) this press key 4 (and 9) and keep pressed - to keep TeamSpeak microphone open when he are talking, when he finish to talk release the joy button (#?) this release the key 4 (and 9).

The various 4 4 4... in this picture of Saitek software show that 4 was keep pressed for some seconds - for keep TeamSpeak microphone open.

https://i.imgur.com/rR3mjDx.png

Simultaneous key 9 is used for mute and un-mute audio on speakers, this key is fine just "flash" 9 once on joy (#?) press and again in release, since mute don't require a key always pressed, but pressed once for ON and again for OFF.

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Sat Apr 28, 2018 12:36

Let's try differently. Button 4 of the keyboard activates the microphone in TeamSpeack.
We use the button in cell 35. We create a replica in any cell above physical (I have 81).
35.PNG
37.png
36.PNG
38.png


So arranges?

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 16:01

Sokol1 wrote:Simultaneous key 9 is used for mute and un-mute audio on speakers, this key is fine just "flash" 9 once on joy (#?) press and again in release, since mute don't require a key always pressed, but pressed once for ON and again for OFF.

Sokol1, you are correct on everything in your post. Except I do keep 9 pressed all of the time to mute. I have software(VoiceMeeter Banana) that controls my audio, and it lets me assign buttons for mute. I can make it a toggle or a push(and hold).

FYI, I did a test with my x55 joystick macro in the VKB Test tab:

Image

I will try your new example now. Thank you..

Snacko
Posts: 23
Joined: Sat Apr 21, 2018 0:24
Has thanked: 1 time

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Snacko » Sat Apr 28, 2018 17:19

Thank you for trying to help me! :D

I do not think this will ever work. VKB does not allow a Key Down separate from a Key Up. So, it will never work.
A Keyboard device's keys have different 'states', just like joystick buttons have different 'states'. Joystick button can have on-off; on-off-on; etc.. A keyboard also has a press-release. But VKB does not allow the user to specify a press or release. VKB just does press+release all by itself with no user control. So this will not work.

If you have any user who has ever set a VKB button for push to talk. Please let me know who it is?

When I do this new button test, it sends the keystrokes over and over... press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release, press+release...

This fills up the Keyboard buffer. It overflows the command stack in VoiceAttack(caused my computer to lock up for 2 minutes). This is a problem. I need just a Key press. And a Key release. But I cannot program VKB to do this.

I am surprised that no one has tried to use this for Teamspeak or VoiceAttack before? Surely someone has tried?

Image

I press button #8 and this is what happens. VoiceAttack locks up my computer for 2 minutes.
You can see that key 9 is press down, and then key 4 floods many keypresses(preventing key 9 release until end). The many, many keypresses are very bad.
Also, Notepad++ is not a good tool for testing key press and release. It does not show key 'states'.

Image

Again, the basic problem is that VKB does not allow the user to specify to only send a key press, or a key release. It does both. All the time. This is basic keyboard functionality.

I think I will have to start looking at other options. Even Auto Hotkey allows this functionality:

Code: Select all

Method #2: This method is necessary in cases where a key or mouse button must be held down for the entire time that you're holding down a joystick button. The following example makes the joystick's second button become the left-arrow key:

Joy2::
Send {Left down}  ; Hold down the left-arrow key.
KeyWait Joy2  ; Wait for the user to release the joystick button.
Send {Left up}  ; Release the left-arrow key.
return


Thank you again for your time.
Unless someone can show that VKB can do a simple Key down separate from a Key up, I don't see how this will work. This is possible and easy to do with the x55.

Snacko

Ron61
Posts: 866
Joined: Tue Jan 15, 2013 23:56
Location: г.Минск
Has thanked: 15 times
Been thanked: 164 times

Re: How to Press 2 keyboard keys at the same time with one button?

Postby Ron61 » Sat Apr 28, 2018 18:06

We try again. Conditions remain the same.
Working.

39.png
40.PNG
41.PNG


We add the second key of the keyboard.
42.PNG
43.PNG


Also works. What is wrong?


Return to “Manuals and Howtos”

Who is online

Users browsing this forum: No registered users and 1 guest