Jump to content
  • 0

Keyboard keys -> momentary buttons


Razvan1203

Question

Hello. Currently I am working on a pong game via VGA Connector with input control from pushbuttons on fpga board. Now I want to replace these buttons with keyboard keys from my laptop. I set up the UART communication, it works.

My problem is that I want the keys to be momentary buttons ( the buttons that need constant pressing to work. Such a button will remain in one position if you apply pressure on them. The buttons instantly return to their original positions when the pressure is released) and not latching buttons (latching buttons are switches that remain in a fixed position when oppressed.)

How can I change that ? Or how can find a solution to solve this ? Any ideas?

Thank you!

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Razvan1203,

I'm unaware of a feature in serial terminal applications like Tera Term or PuTTY that would signal key release events.

One option is to put together a custom app or script capable of detecting keypress events and forwarding them to the board over USBUART. A script using the python pygame and pyserial modules would be capable of this. Plenty of guides exist online for getting keyboard input in pygame and sending data to a board via a serial port with pyserial.

Alternatively, the Nexys A7 has USB keyboard support via an emulated PS/2 interface that you can use instead of UART. Check out the appropriate section of its reference manual for more information. There's also a demo that shows the use of a keyboard: https://digilent.com/reference/programmable-logic/nexys-a7/demos/keyboard

Thanks,
Arthur

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...