Using keyboard to control a dialog/shop

Hello together,

in our project, we have a shop. So far, so good.
I can talk to the salesman by pressing the key for action (e.g. E/Enter) - this works.
Now I can press E/Enter to choose, if I want to buy or sell something. At least I can buy Items with E/Enter.

To my problem:

If I have all three keyboard accesses with “isKeyDown” - it does not work.

It is skipping the buy/sell state and the customer instantly buy the first item.

If I mix the accsses with “isKeyDown” and “isKeyUp” it works half - it is possible to select buy/sell - but if I select buy, it still buys an item (the first).

Has anybody an idea to solve this “problem” or have an other approach?

Greetings,

v4mpy

puriyala machi..

1 Answer

1

Just change the order of statements.

A B C becomes C B A.