Author Topic: SquidLib: Getting keyboard input  (Read 5786 times)

penguin_buddha

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • Email
SquidLib: Getting keyboard input
« on: September 13, 2012, 04:22:49 PM »
I've been looking at Squidlib and i'm interested. My only question is whether the library has any build in methods to get keyboard input. As far as I can see, it doesn't. I'm curious how Eben gets input for his games...

yam655

  • Rogueliker
  • ***
  • Posts: 59
  • Karma: +0/-0
    • View Profile
Re: SquidLib: Getting keyboard input
« Reply #1 on: September 13, 2012, 07:00:54 PM »
I've been looking at Squidlib and i'm interested. My only question is whether the library has any build in methods to get keyboard input. As far as I can see, it doesn't. I'm curious how Eben gets input for his games...

My understanding is that it's just a Swing component. As such, you use the standard Swing event mechanism to get key input.

While there are other approaches, you can look at http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyListener.html

Cheers,
Steven Black