ink
ink copied to clipboard
Ink 4.4.x incorrectly detects backspace
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 />);
Feel free to look into this and submit a PR.
hello
The same thing happens on Mac.