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

Ink 4.4.x incorrectly detects backspace #634

Open
cpendery opened this issue Oct 24, 2023 · 3 comments
Open

Ink 4.4.x incorrectly detects backspace #634

cpendery opened this issue Oct 24, 2023 · 3 comments

Comments

@cpendery
Copy link

On Windows, backspace is properly detected; however, on Linux backspace is detected as delete

Minimal reproducible example

import React from 'react';
import {render, useInput, Text} from 'ink';

function Input() {
	useInput((_, key) => {
		if (key.backspace) {
			console.log("backspace")
		}
		else if (key.delete) {
			console.log("delete")
		}
	});

	return (
		<Text>Example</Text>
	);
}

render(<Input />);
@vadimdemedes
Copy link
Owner

Feel free to look into this and submit a PR.

@loly213
Copy link

loly213 commented Nov 24, 2023

hello

@nukeop
Copy link

nukeop commented Jun 23, 2024

The same thing happens on Mac.

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

Successfully merging a pull request may close this issue.

4 participants