unix - Java key release event from STDIN in terminal raw mode -


i'm trying write console game using java, , when hold down key, want move character constantly.

this means need key press , key release events, because there delay when hold down key before starts typing same letter on , over.

i've put terminal raw mode using stty, don't seem getting key release events.

this answer seems indicate can indeed events stdin: https://stackoverflow.com/a/1598436/2404047

what receive when in raw mode single byte keys, in cases, arrow keys, multiple bytes.

is there way can key press , release events through stdin, or console game not doable?

this missunderstanding. cannot events console using pure java.

possible solutions are:

  1. get events using native utility, redirect them file/pipe , read them java code file
  2. use jni/jna directly
  3. use library wraps jni , expose java api purpose. take on charva provides api need , more.

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -