Questions tagged [arrow-keys]

The up, down, left, and right keys on a keyboard, also known as "cursor keys".

The arrow keys are the up, down, left and right keys on a keyboard, also known as "cursor keys". They are primarily used to move the cursor around on-screen text, and are also often used to move player characters in games.

They behave as normal keys for keyboard events, returning both a Unicode value and a code.

References

363 questions
2
votes
1 answer

Moving the player with arrow keys instead of thumb sticks

I'm working on a 2d game and I want the player to be able to be moved with the arrow keys. I've managed to make the player move by the left thumb stick (Xbox 360 controller) GamePadState gamePadState =…
inFever
  • 1,809
  • 2
  • 16
  • 19
2
votes
0 answers

Navigation with arrow keys to the left does not work with input readOnly

I have built a table with 4 columns. 1 column is text and the other 3 are inputs that are set to readOnly. For this table I have written an arrowKeyCodeNavigation. The operation works so far. But if I navigate for example in the first row to the…
user10114552
2
votes
2 answers

jQuery next sibling that has a particular kind of child

My HTML has a container element with many sibling div elements, each of which contains a contenteditable p. These sibling div are "interrupted", however, by other div which do not contain an editable element. What is challenging me at the moment is…
Tim
  • 8,669
  • 31
  • 105
  • 183
2
votes
3 answers

How to differentiate between Escape and Up/Down/Left/Right with termios?

GitHub This is the best I can come up with to handle ncurses-style key presses (I'm actually writing an alternative to ncurses for various reasons). An example app built with this code advises the user to "Quit by pressing Escape". In truth, it…
mcandre
  • 22,868
  • 20
  • 88
  • 147
2
votes
2 answers

Navigating out of a TextField in a GridPane using the arrow keys in JavaFX

I am making a sodoku solver program in Java with the JavaFX library. The program incorporates an interactive sodoku board consisting of a series of TextFields in a GridPane. The board looks like this: Right now, the cursor is in the top left most…
qwerty
  • 810
  • 1
  • 9
  • 26
2
votes
1 answer

(React.js) Scroll through list using arrow keys

I'm developing an autocomplete component, but I'm not able to scroll with the arrow keys (down/up), with the mouse it works normally. image I've researched a lot about it and tried to solve this problem with refs, but it didn't work. const refs =…
2
votes
1 answer

jQuery e.which in switch statement

In the below switch statement when left key is pressed, it alerts left and when top key is pressed it alerts top. How can i make a case for combination of both shift and left key. $(document).keydown(function(e) { switch (e.which) { …
Pinkie
  • 10,126
  • 22
  • 78
  • 124
2
votes
1 answer

Arrow keys control in a custom shell using C language

I'm trying to make arrow keys move between characters in a single line (left + right) and between commands from history (up + down) for a custom shell (semester project). at this point when hitting one of the arrows ^[[A, ^[[B, ^[[C or ^[[D is…
Basel Abuhadrous
  • 1,444
  • 1
  • 14
  • 30
2
votes
1 answer

Moving across elements using Up-Down keys

I make a program using PyQt5 and Python3.7. How to move across elements using arrow keys instead of tab key? (e.g. moving from button to textbox using down key) import sys from PyQt5.QtWidgets import QApplication, QLabel, QLineEdit, QMainWindow,…
mng97
  • 75
  • 9
2
votes
0 answers

Ignoring arrow keys when using the select menu with readline

I have written a bash script that looks like this which basically handles user operation based on selection. PS3='Please enter current status of the completion: ' boolean_status=("completed" "not-yet") select opt in "${boolean_status[@]}" …
KNDheeraj
  • 834
  • 8
  • 23
2
votes
1 answer

Snake Game popup improving and for mobile use javascript

I recently made this game and wanted to ask how to improve it. I made an alert box inside the javascript for when the game ends. It works but it's not beautiful. so I wanted to ask how can I change the Color and the message on the top of the alert…
2
votes
4 answers

How to implement WPF Datagrid arrow key navigation like Tab navigation

I have a DataGrid with few editable cells. Users can tab through each cells to edit the content. Now I want to implement the right arrow key working just like tab. So when a user finishes editing one cell and they press right arrow key, the focus…
Jing
  • 21
  • 1
  • 3
2
votes
1 answer

How can i handle arrow keys in c on console?

How can i handle arrow keys in c language when i dealing with console to edit or delete some characters. Example the "|" is the cursor: >>> hello world| //after i click on left arrow three times >>> hello wo|rld //then i can remove the char "o" or…
user5693629
2
votes
2 answers

How to use arrow keys to move object smoothly in canvas

I'm working on making a simple space game where a ship moves left and right to dodge asteroids. I learned to move my ship left and right from this video. But the movement is pretty blocky. How do I move the ship smoothly? Here is all my code: //…
Dylan Madigan
  • 31
  • 1
  • 1
  • 2
2
votes
1 answer

Trigger css animation in javascript

How can i get my CSS animation trigger when i press down arrow key? Animation code: