Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrow key support #18

Open
Quicksilver151 opened this issue Feb 13, 2024 · 1 comment
Open

arrow key support #18

Quicksilver151 opened this issue Feb 13, 2024 · 1 comment

Comments

@Quicksilver151
Copy link

being on a laptop makes it hard to use h,j,k,l keys without the touchpad getting in the way, so arrow keys are preferable for me. would it be possible to allow cursor to move with arrow keys instead?

@zeckrust
Copy link

zeckrust commented Jul 1, 2024

Hey! I added these lines in the cursor.gd file, under the _input(event) function on line 87. It seems to be working. I didn't get any issues but I have not tested it that much.

	if Input.is_key_pressed(KEY_UP):
		move_line(-1)
		accept_event()
	if Input.is_key_pressed(KEY_DOWN):
		move_line(+1)
		accept_event()
	if Input.is_key_pressed(KEY_LEFT):
		move_column(-1)
		accept_event()
	if Input.is_key_pressed(KEY_RIGHT):
		move_column(+1)
		accept_event()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants