PDA

View Full Version : [Java] Catturare la pressione di un tasto


Ultrabyte
18-12-2006, 11:07
Salve ho un quesito qualcuno di voi saprebbe indicarmi il modo per poter catturare il keycode (ASCII ) di un tasto premuto dalla tastiera per poi stampare il suo codice a video ovviamente in java ??( sarebbero graditi anche due righe di codice ) Grazie a tutti :D

Ultrabyte
18-12-2006, 18:43
Nessuno sa darmi un'indicazione sul argomento ??

^TiGeRShArK^
18-12-2006, 20:46
implementi un KeyEventListener e stampi il keyCode del metodo onPress() o onRelease() (o qualkosa del genere :p) ke vengono utilizzati x la gestione a basso livello contrariamente ad onKeyTyped() (o qualcosa di simile :asd: )

Ultrabyte
20-12-2006, 13:16
ok perfetto proverņ la tua soluzione e ti faccio sapere graize mille :-)
TiGeRShArK

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.