macos: add missing deleteForward: action

on mac the `Delete` key is really `Backspace` and should generate the
`BS` sequence.

`Fn-Delete` is equivalent to the `Delete` key on other keyboards and
should generate the `DEL` sequence.

BS maps to deleteBackward
DEL maps to deleteForward

heads up to @fanzeyi: this partially reverses 8c26b77057
This commit is contained in:
Wez Furlong committed 2019-11-06 00:34:31 -08:00
1 parent fea35978c4
commit b651d8bd61
1 file changed
+2 -1
+2 -1
View File
@@ -621,7 +621,8 @@ impl WindowView {
extern "C" fn do_command_by_selector(this: &mut Object, _sel: Sel, a_selector: Sel) {
let selector = format!("{:?}", a_selector);
let key = match selector.as_ref() {
"deleteBackward:" => KeyCode::Char('\x7f'),
"deleteBackward:" => KeyCode::Char('\x08'),
"deleteForward:" => KeyCode::Char('\x7f'),
"cancelOperation:" => KeyCode::Char('\x1b'),
"insertNewline:" => KeyCode::Char('\r'),
"insertTab:" => KeyCode::Char('\t'),