Questions tagged [keyboard]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

how do you get pygame to register multiple key presses at the same time

every time i try to operate player one and two or try to use the pickup key it stops the players.plz help here is my code- ...
1
vote
0answers
42 views

How to implement GIF insertion in Unity? “XYZ App doesn't support image insertion here”

I'm making an Android App with Unity, which has a chat service in it. And I would like to handle sending images or GIFs via Gboard. Currently when the user selects a TextField, his keyboard comes up,...
0
votes
0answers
29 views

Shift game view when on-screen keyboard is displayed

I want to take input in a TextField but the keyboard hides the view, so I want to scroll it by adding padding to it since table ...
2
votes
0answers
18 views

Javascript: Eventlistener 'keydown' not registering all keys pressed when holding down other keys [duplicate]

Sollution provided in the comments. The issue is that my keyboard has what is called ghosting issues, this means it doesn't support some key combinations when pressed together. When the user holds 's'...
2
votes
1answer
336 views

Handling Ctrl-<key> shortcuts in Unity, respecting user preferences

I am implementing some software with Unity that needs to support Ctrl-<key> shortcuts such as Ctrl-c. I want to do this in ...
1
vote
1answer
887 views

Show/hide soft-keyboard on demand

I'm writing simple chat-app using Unity. The problem with Unity's default implementation of soft-keyboard visibility is that it hides itself when i'm clicking outside of keyboard panel. What i want is ...
0
votes
1answer
197 views

How do I make a blueprint run keyboard key commands?

I created a project based on the Top Down Example. In the project comes a character that I can move by clicking on the terrain that already comes by default. Image of gameplay: In the character's ...
0
votes
1answer
249 views

Ideal 3D platformer controls for Keyboard + Mouse [closed]

I am developing a 3D platformer, and I know that controller is optimal for the precise movement, but I don't feel players should have to buy a controller just to experience a 3D platformer that is ...
0
votes
1answer
411 views

Custom mobile keyboard in unity

I'm trying to create a falling word typing game like z-type. I have used the code provided here — but it's is only for keyboards: ...
1
vote
1answer
451 views

What is the difference between a hotkey and a shortcut-key in a game?

I was wondering: What is the exact difference (if there is any) between a hotkey and a shortcut-key in a game? Some games for example allow the player to bind certain actions to a specific key and ...
3
votes
1answer
128 views

How to identify individual keyboard keys across devices from different locales

I'm trying to make a UI system that adapts images for key binding depending on the keyboard type (azerty/qwerty/etc). For the moment I've done the binding with DirectInput Key Codes so it does not ...
0
votes
2answers
964 views

SDL/C++ Keyboard Input

I'm having trouble with key management. Movement works fine but the shooting does stuff that I don't want to happen. Every time I press the arrow keys to shoot it works fine but when I press a key ...
0
votes
1answer
51 views
0
votes
1answer
23 views

My sprite is not listening to any keyboard keys

First time ever creating html canvas game. Once I finally got my sprite ant tiles drawn on the canvas, now I want to make my sprite interactive. Unfortunately, for some reason it is not working. I get ...
0
votes
1answer
87 views

Java: refresh KeyInput to avoid sticky fingers during gameover state

In short, I am trying to avoid my keys from sticking when its in the gameover state. The problem is if the player is holding down the right button for instance and dies, then he restarts the game ...
1
vote
1answer
1k views

pygame KEYUP KEYDOWN events only once per frame?

I've been playing around with pygame, and I ran into a bit of an odd issue with input on the pygame event queue. Consider the following test code: ...
1
vote
0answers
74 views

Default movement keybindings for roguelike?

I'm developing a text based MUD, but unlike MUDs I'm developing without telnet and making a custom interface. Think Caves of Qud or Dwarf Fortress. The game only has 6 directions you can walk. ...
4
votes
1answer
432 views

Swing KeyListener doesn't work when pressing Shift X Z and directions at the same time

My code: ...
3
votes
1answer
345 views

Why do I have delays when pressing a keyboard key continuously to move the character?

What happens is I press right for a fraction of a second then release and my character moves to the right, as it is supposed to. I then press right again but this time for 5 seconds. My character ...
1
vote
1answer
253 views

How can I process extra mouse buttons using Monogame?

I use Monogame for game development. For processing mouse input, I can use the Mouse class to query basic information like left click state, right click state, and ...
0
votes
1answer
2k views

Pygame set_repeat() issue

I want a single key press to result in the sending of one event in my game loop. As a toy example, if the player presses and holds LEFT, I want the sprite to move 1 pixel left and then stop until the ...
1
vote
1answer
281 views

Handling of persistent key presses in an ECS

I'm currently in the planning phase of a game. The whole thing should be based on the entity-component-system (ECS) pattern. All logic is concentrated inside of the systems, i.e. that the components ...
1
vote
0answers
551 views

Detecting keys presses between keyboard layouts, operating systems and javascript

I've recently encountered a few headaches when I tried to detect key presses for a custom game engine to supports Windows, MacOS, Linux, and WebGL. Naive approach: At first I naively thought that ...
2
votes
1answer
135 views

How to handle keyboard controls in Arkanoid game

I'm making simple Arkanoid clone in Unity with both keyboard and mouse controls available. When I gave it to my colleagues to test one complain was that keyboard controls are not precise enough,. The ...
0
votes
1answer
4k views

How can I use keybord keys like W, A, S and D in GLUT and C++?

I want to use W, A, S and D keys like GLUT_KEY_LEFT. My Code: ...
0
votes
1answer
57 views

Unity Deactivating Keyboard Input Interpolation

I'm working on a game in Unity, and it is a little jarring to use with keyboard controls. I'm using the built in Input Manager, where I have a set of axes mapped to the left and right keys. When the ...
1
vote
1answer
567 views

SDL2.0.5 - SDL_KEYDOWN shows two identicle presses when only one key is pressed

SDL2.0.4 using this code: ...
1
vote
1answer
156 views

How can I enhance this keyboard handler class (remove global variables)

I would like to enhance my keyboard class to be more tight and encapsulated. The first issue I've addressed is Singleton design pattern. I've done this as follows: ...
1
vote
2answers
827 views

Handling keyboard input in SDL2

I'm using SDL2 with .NET bindings. Keyboard handling is encapsulated in static class, and keyboard handling code part looks like this: ...
3
votes
1answer
260 views

How to handle complex inputs in 2D platform game?

I am trying to add keyboard control for my character in 2D platform game with JavaScript. The character can walk, dash and jump. Here is my current code: ...
1
vote
1answer
41 views

Need help solving EventHandler issue

I have an issue with my EventHandler for Key events in my game. The specifics are in this forum thread: http://www.java-gaming.org/topics/problems-with-key-event-handling/37998/view.html Basically, ...
1
vote
3answers
3k views

Continuously get keyboard input from user and remember last character [Java]

I want to write a Snake game in Java. How can I continuously monitor input and if user pressed W set variable ...
0
votes
3answers
6k views

Input.GetKeyDown need to press button more than once to work

So in Unity3D I'm checking for Input.GetKeyDown(KeyCode.E) for stuff like pickups and opening doors. Sometimes it doesn't work the first time I press it and I must ...
1
vote
2answers
124 views

Timing in holding LWJGL keyboard event

I'm using LWJGL to develop a 3D game. I'm having trouble with my keyboard handler. My aim is to implement the function which is holding Space then release it to trigger an increasing of the velocity ...
2
votes
2answers
605 views

Can't move rectangle constantly with key down

I can only move the rectangle every time I push a key down. How would I continuously move my shape when the key is down? Here's my code: ...
1
vote
0answers
228 views

Get modified key with SDL2

If I poll keyboard events with SDL2 all I get is the pressed key and the modifiers. But I am using Neo and have some keys like Esc and arrow keys on a different layer which means that e.g. ...
0
votes
1answer
96 views

Managing left and right direction buttons being pressed at the same time

I am currently programming a Tetris clone. In Tetris, there is a system being used called DAS, or Delayed Auto Shift. It works similarly to the keyboard auto-repeat used in Windows. For example, if ...
1
vote
1answer
635 views

How to handle keyup events in game loop?

I'm writing a simple game in JavaScript, which already handles basic keyboard input like so: ...
0
votes
1answer
280 views

Game optimization and keyboard events

I've been putting some (a lot) of thought about how to read keyboard input and especially, when. Looping through all the keycodes on the keyboard and updating the statuses seems like a lot of waste ...
0
votes
1answer
373 views

How to get status of LEDs on keyboard and blink LED on keyboard from Unity 3D on Android?

On Android, with Unity how do I get the status of caps lock, scroll lock and num lock LED's and blink these LEDs for caps lock, scroll lock and num lock from Unity 3D? Blinking the LEDs will of ...
0
votes
5answers
1k views

What keys should I use for a four-player game with one keyboard?

I'm planning on making a multiplayer game for up to four people on a single machine. We want to have all input coming from players using the same keyboard (or multiple keyboards connected to the same ...
2
votes
1answer
2k views

Correctly creating/handling events for keypress in MonoGame C#

I'm having trouble finding the best approach to registering an instantaneous user key-press with MonoGame (where the key has been held down and then released), using events in C#. Unlike the click of ...
2
votes
1answer
571 views

KeyCode dictionary in Unity

I found a strange problem while programming keyboard input in Unity (v5.3.5). ...
11
votes
2answers
4k views

Removing delay at start of a key press

I'm making a simple game, and one of the problems I encountered is the annoying delay when pressing a key continuously. So basically, when I press (for a very long time) for example Up, my object ...
0
votes
1answer
1k views

How do I fix a delay between the first and second KeyEvent

I recently got really interested in making my own little game. As I have no real game development background I'm still figuring stuff out, but I encountered a little problem. While working on the ...
1
vote
1answer
925 views

SDL2 SDL_PollEvent endless polling on key hold

What is wrong with SDL2 SDL_PollEvent() function? When I press-and-hold a key it enters "while (SDL_PollEvent())" block each frame. If in previous frame event queue was emptied and in new frame I ...
1
vote
1answer
761 views

How to handle two players playing on one keyboard with Box2D (LibGDX)?

I'm making a racing game with LibGDX and Box2D. I've been using this tutorial to implement the basic physics, and it works properly. My main problem is to implement two different sets of keys (UP-...
0
votes
1answer
552 views

Simulate Keyboard Button Press [SDL Library]

I am trying to simulate an SDL keyboard button press (using C). I have looked up the SDL info pages online but I still don't have anything that consistently works. I have the following (removed the ...
0
votes
3answers
453 views

Get pressed character in LWJGL (Ignoring modifier keys)

I have a basic text field setup in LWJGL, however pressing any modifier keys (Shift, F1-19, Page Up, etc.) inputs a space into the text field. How would I ignore those characters? Here's some code so ...
0
votes
3answers
3k views

Problem with Input.GetKeyDown to set a counter in Unity: multiple values in only one pressing

Using Unity 5, I want to use have one keyboard key ("f") increase a counter when pressed. It means, using Input.GetKeyDown("f") function in a way that: if "f" is pressed when the counter=1, then the ...