How do I simulate a keystroke with another keystroke

Get help using Construct 2

Post » Tue Nov 10, 2015 12:22 pm

Hi,

I need to simulate a keystroke with another keystroke. e.g.: on key "o" pressed - simulate keystroke "p"

(How) Is it possible?

Thanks,

Held
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 12:23 pm

Could you explain what you need it for?
Is it for typing or for attaching events to the keystroke?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 10, 2015 12:30 pm

I need a key-signal for a software parallel to construct, which controls electricity.
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 12:46 pm

That doesn't really answer my question, but you could use things like "on keycode pressed" and such..
See the keyboard entry in the manual for reference..

A lot of it depends on what you are trying to do and in what way you want to do it..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 10, 2015 1:04 pm

Ah, ok. I need it for typing, in other words: construct should send a specific key-signal 'outside' which another software, which runs besides construct, picks up.
Does this help?
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 1:13 pm

Would something like this work for you?

keyboard on o pressed : set variable to "p"
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 10, 2015 2:30 pm

Don't really get it. Which variable and can I attach a variable to a keystroke?

Thanks, I'm A beginner :)

hELD
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 2:50 pm

Held wrote:Don't really get it. Which variable and can I attach a variable to a keystroke?

Thanks, I'm A beginner :)

hELD


If you don't get it, I don't..

You want to send something to another application, you say..
That message should be set to the keystroke, but not the key touched, but another one..
Instead of "the message" (I have no idea how you are going to send it) I set a variable, so you can send the variable as a message..

Create a text variable and you see, you can set it to another letter as you wish..
You could also create a text-object and use that instead of the variable (or just to show the variable so you can see it works)..

If this isn't what you want, please explain in greater detail..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 10, 2015 3:35 pm

Thanks for keeping up :)

Maybe I didn't explain it right. I try again:

I don't want to set another key as a 'graphical symbol' which can be read on the screen.

The whole story is: I want to run a game, programmed with construct, and in that I want to combine certain actions with light effects (with real lights in a real room).

So I need an impuls which can be picked up by a dmx-application, a software, which can control real lights (on, out, etc.). And this dmx-software can control the lights with key-commands.

So, my wish in construct is something like this:

Keyboard - on P pressed - set sprite.xy visible
- simulate keyboard press O

Does this help?

Thanks
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 4:26 pm

I do not understand what the simulate keypress would do in this example..
There don't seem to be any actions attached to the keypress..

Maybe I don't understand, but..
If the other program runs at the same time and needs a specific key pressed, why not press that key?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 45 guests