Often the primary input for computer games. It boasts a very large versatility for direct input.

learn more… | top users | synonyms

0
votes
0answers
15 views

What is a simple way to pull input from a keyboard and attach it to a std::string?

The question says it all to be honest. I have a game that I am making in Ogre3D, using OIS as the main input library. My issue is that I am attempting to use CEGUI (with tons of errors) all to simply ...
0
votes
0answers
18 views

Indicate key options in a keyboard-only game

I am creating a music-based app for one of the courses I teach at a high school, so it's not for sale in the app store, it's only for my students to use. I decided to make it keyboard only partially ...
1
vote
0answers
18 views

LibGDX: How to detect remote button press for Android TV?

On Android TV, I need to be able to detect the remote control centre button to start the game. I tried: if (Gdx.input.justTouched() || Gdx.input.isKeyJustPressed(Input.Keys.SPACE) || ...
2
votes
2answers
78 views

LibGdx TextField - Hide Keyboard when not focused - How to?

I'm creating a registration screen for my game. I implemented textfields and input is getting correctly. But when I click elsewhere after text is entered, the keyboard stays visible and does not hide ...
0
votes
1answer
68 views

Missing keyup event

I have a pretty generic input class. In the main app, I forward an event to the game. The game an input object that manages Keyup and Keydown presses. It stores the keys pressed in a ...
-2
votes
1answer
27 views

single Key press [duplicate]

I have my following (static) KeyListener http://pastebin.com/gR1i3Xzb and this is my update Method: @Override public void update() { input(); /*...*/ } private void input() { ...
1
vote
0answers
32 views

Custom Keyboard run by Arduino not working in XNA

I'm trying to make a stenotype-teaching game using the stenoboard as input. The Stenoboard emulates an NKRO keyboard, using this code: https://github.com/caru/StenoFW/blob/master/StenoFW.ino, with an ...
0
votes
0answers
21 views

Acceptable latency for keyboard input

What is the acceptable latency for keyboard input? acceptable here means that a person doesn't notice the lag even subconsciously? For me the responsiveness of the interface is critical for a good ...
1
vote
0answers
29 views

Unity: Finding out where OnSelect comes from

The new UI EventSystem method OnSelect is called from a number of different sources. One is when the Selectable is selected by using the arrow keys to navigate. Another is when clicking on the ...
1
vote
1answer
73 views

Keyboard input vs character movement encapsulation

In our game created with c++ and sdl we are having difficulty delegating how the main character should be controlled. We have a keyboard class and a sprite class for the main character, but are ...
0
votes
0answers
34 views

Problem with keyListener

I have written some code that makes a labyrinth,and fills the JPanel with my figures (Wall, Player, Road and Gate). I want to move the player with WASD, so I have written the following code. The frame ...
0
votes
0answers
62 views

How do I make a Slick2D TextArea display newlines?

Whenever I press the Enter-key my Slick2D TextArea does not go to the next line. How can I make it do that? Here is the code that involves the TextArea: private TextField ta; public void ...
1
vote
1answer
113 views

Reference keyboard keys as “justPressed”, “pressed”, and “justReleased” with SDL in C++

I'm teaching myself 3D graphics with OpenGL and SDL in C++. I'm at a point where I need to be able to query states of individual keys, like so: if (InputManager::justPressed(SDLK_UP)) {} if ...
3
votes
2answers
140 views

How can I support remappable controls?

I am trying to allow players of my game to remap the controls (eventually from the menu). Currently, some of the buttons have been defined, but they can't be changed. They are hard-coded. For example, ...
2
votes
1answer
75 views

How does XNA's KeyboardState represent all keyboards?

I already understand how to work with Keyboard and KeyboardState, but when debugging I happened to take a look at the KeyboardState's non-public members via the VS debugger. I expected to see a large ...
3
votes
4answers
790 views

Key mapping for a 2-players game

I've been struggling for a while trying to figure out the best way to map two players on a single keyboard. Let's consider something generic: Arrows Validation Cancel (optional) Some common actions ...
1
vote
2answers
87 views

Standard key bindings for movement along three axes?

I understand that the WASD keys are standard for moving a character along two axes (left/right, up/down) because in the QWERTY layout, they are arranged like the arrow keys. I want to make a game ...
0
votes
1answer
90 views

Checking whether a specific key was pressed in enchantJS

I am using enchantJS and would like to use the letters and numbers as well as numpad on a keyboard to do different things (eg: hotkeys). From this page ...
0
votes
1answer
57 views

Is it possible to a create an Android game that uses the built in keyboard?

I know the keyboard is probably built into the Android OS and I have a simple game idea, sort of like a word game, but is it possible to create a game that uses this in the game itself?
1
vote
3answers
183 views

Key Handling mechanics

I am new to game development and am working on my first game using OpenGL and C++. I have a game class which handles everything necessary in an update() function. Now i want to handle keyboard inputs. ...
1
vote
1answer
643 views

What does a “video system not initialised” error in pygame mean?

I'm trying to play music when a key is pressed in pygame, then print a message. When I run this script: import pygame import time pressedkeys = pygame.key.get_pressed() pygame.init() ...
1
vote
1answer
582 views

What alternatives are there for creating Keyboard/Mouse controls in LWJGL?

So I'm currently working my way through openGL tutorials, using LWJGL to do all my work in. However as I get to the part on how to access Keyboard and Mouse events in this library, I stumble across ...
1
vote
1answer
71 views

Multiple keypresses causing wierd results in SDL

I have been building a pong clone. I've been using a mixture of peoples different code to understand the way they structure their games as well as reading on game patterns. Currently I've gotten to ...
4
votes
1answer
2k views

How can I forward GLFW's keyboard input to another object?

I'm having trouble trying to execute keyboard events in a another class with GLFW3. The problem I'm having is that GLFW3 uses a static function for input as shown: static UI u; ... ... static void ...
1
vote
1answer
254 views

TopDown 2d player control

Whats the usual way to control a player in a top down game? We have to look in the direction of the mouse cause the player hold a torch. My first try was: to to make it absolute like W move to ...
1
vote
1answer
153 views

How can I check for key releases between keyReleased callbacks?

Slick2D's Input class has a isKeyPressed() method that returns a boolean value according to whether the specified key has been pressed. I want to check if a key has been released in the same fashion. ...
0
votes
1answer
36 views

Weird case of a key not working [closed]

I finished a game in Java. It works perfectly fine on my computer. Sent it to a friend. On his computer, for some reason, one of the keys that are used to play doesn't work inside the game. (It works ...
1
vote
0answers
121 views

FreeGLUT keyboard IO timing and synchronization

Using FreeGLut's keyboard callbacks, glutKeyboardFunc(); glutKeyboardUpFunc(); glutSpecialFunc(); glutSpecialUpFunc(); When in the glutMainLoop pipeline do these functions get called? In other ...
1
vote
1answer
214 views

Multiple keys being pressed, some being ignored SDL

I'm making a two player pong clone and my problem is that when the second player presses both of his/her buttons at once, the first player locks up and cannot move, even though this does not happen ...
0
votes
3answers
417 views

How can I access LWJGL's Keyboard from a thread other than the graphics thread?

I'm loving LWJGL, but have been running into a number of odd problems with it. Most of it seems to deal with the fact that OpenGL is a state-machine and was only ever meant to be accessed from a ...
1
vote
2answers
133 views

StringBuffer behavior in LWJGL

Okay, I've been programming in Java for about ten years, but am entirely new to LWJGL. I have a specific problem whilst attempting to create a text console. I have built a class meant to abstract ...
0
votes
1answer
681 views

LWJGL - Continuous key press event without delay

I am checking for key presses and then based on the keys pressed I am moving a square around the screen. I am setting booleans for the keys WASD. But , Whenever I try to keep the key down , it takes a ...
3
votes
3answers
806 views

What are reasons for input polling vs. input events?

I noticed people use both - but is there any empirical evidence when it's better to use one over the other? This is related but not quite a 'why use either' or even 'why use both': Polling vs event ...
0
votes
2answers
3k views

Detecting key press only once in Libgdx [duplicate]

Have a question on keyboard inputs. Currently I am using this method to read my input, Gdx.input.isKeyPressed(Input.Keys.A), it is working fine. But I do realized at times there are multiple instances ...
1
vote
3answers
2k views

how to detect same keyboard key press only once

I am designing a keyboard class that can detect the keyboard key press only one time but I still cannot figure out the way to do it. My goal is just check and perform the action only once when the ...
1
vote
1answer
357 views

LWJGL Wait for key press in a single method

Currently I am implementing the possibility in my game to change the keyboard configuration. Therefor, I have a menu in which is a button for each action the player can do. If the player clicks on one ...
0
votes
1answer
369 views

Design question: How to handle input more efficiently?

I'm designing a system to handle the keyboard input for my game. To get it more simple, I have a class that has two methods, KeyUp and KeyDown which tell me which key has been pressed, this is already ...
1
vote
2answers
284 views

XNA slowly stops sprite movement on key released

I'm making a game where player moves around a spaceship pressing W,S,A,D. What I would like to achieve is that I would like to make the ship stop slightly when a key is released before it went to full ...
2
votes
2answers
2k views

LWJGL multiple keyboard/mouse input checks

As in many game libraries such as LWJGL, you can check mouse/keyboard events with Mouse.isButtonDown or Keyboard.IsKeyDown. I want to check for button/key presses, not if it's currently pressed down ...
-3
votes
1answer
80 views

How to Complete a Two Key Animation with One Key [closed]

I have a game where I need to perform an action by pressing U and K at the same time, but I also want it to be accomplished by only using one key, because pressing both at the same time ties up your ...
5
votes
2answers
3k views

How do I read input from multiple keyboards/mice on one computer?

I want to be able to read inputs from multiple keyboards and still differentiate them. It's for split-screen. I know it's possible, because Serious Sam 3 allows it. Edit : Well a whole lot of my ...
0
votes
2answers
114 views

Keyboard Enter doing two things at once

In my CheckKeyboard(Keys.Enter) it does both of the things when I only want it to do one and the the other on the next enter click, I can't think of how to fix it. Thanks in Advanced, here is the ...
3
votes
3answers
10k views

Java - Best Implementation KeyListener For Games

I am working on a game using only the swing and awt packages. Note I can only use the default Java libs. Meaning I have to use KeyListener. I have imported KeyListener properly, however, it is still ...
3
votes
2answers
92 views

What is the best way to close dialogs in a platform game controlled by keyboard only

I'm developing a flash puzzle platform game in my free time and I got stuck on deciding how to implement a feature. The game will be controlled by keyboard only, no mouse available. My game will have ...
1
vote
1answer
80 views

Which key bindings to use for switchable primary and secondary attacks?

I am making a game in which the player can have a primary and secondary weapon (like an ability). These are my current planned key bindings: Action | Effect ----------------- Click | Shoot primary ...
2
votes
5answers
4k views

RPG movement holding down button

I've been writing a simple top down mini RPG in python. My problem is that when I move the player I have to repeatedly tap the arrow key. Each time I tap the key the player moves 5 PX in the ...
6
votes
4answers
1k views

How can I handle different keyboard layouts?

Let's say I have a game that uses WASD controls on a QWERTY layout. Trying to use these controls on, say, a Dvorak layout is not ideal (equivalent to <A:H on QWERTY). Obviously, I'd want to use the ...
-1
votes
1answer
183 views

My ClanLib based Keyboard Manager not working [closed]

I created a simple Keyboard manager to detect whether buttons are currently pressed, or if where pressed in that frame. It seems like it should work, yet it seems to not read anything. Here is my ...
2
votes
2answers
2k views

Receiving keyboard events on a canvas in Javascript

I need to receive keyboard events in a canvas element. Click events are received but key presses aren't. Here is my code which doesn't handle key events: var canvasElm = $('canvas'); ...
5
votes
2answers
208 views

Pygame fails on KEYDOWN with Russian keyboard layout

When I press a keyboard button on a keyboard with a Russian layout, my application pygame game crashes with this message: UnicodeEncodeError: 'ascii' codec can't encode character '\u0444' in ...