Skip to content

Commit

Permalink
🚸 Add more special keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Jul 17, 2024
1 parent f9339f6 commit 22feebb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/rime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export class Rime {
let num = number + 1;
this.registerKeymap('F' + num, []);
}
this.registerKeymap('Return', ['Control']);
this.registerKeymap('Return', ['Shift']);
this.registerKeymap('Tab', ['Shift']);
this.registerKeymap('BackSpace', []);
this.registerKeymap('space', ['Control']);
this.registerKeymap('BackSpace', ['Alt']);
Expand Down Expand Up @@ -307,6 +310,27 @@ export class Rime {
{ nowait: true },
]);
}
workspace.nvim.request('nvim_buf_set_keymap', [
0,
'i',
'<C-CR>',
'<Plug>(coc-rime-Shift-Return)',
{ nowait: true },
]);
workspace.nvim.request('nvim_buf_set_keymap', [
0,
'i',
'<S-CR>',
'<Plug>(coc-rime-Shift-Return)',
{ nowait: true },
]);
workspace.nvim.request('nvim_buf_set_keymap', [
0,
'i',
'<S-Tab>',
'<Plug>(coc-rime-Shift-Tab)',
{ nowait: true },
]);
workspace.nvim.request('nvim_buf_set_keymap', [0, 'i', '<BS>', '<Plug>(coc-rime-BackSpace)', { nowait: true }]);
workspace.nvim.request('nvim_buf_set_keymap', [
0,
Expand Down Expand Up @@ -419,6 +443,9 @@ export class Rime {
let num = number + 1;
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<F' + num + '>']);
}
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<C-CR>']);
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<S-CR>']);
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<S-Tab>']);
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<BS>']);
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<C-Space>']);
workspace.nvim.request('nvim_buf_del_keymap', [0, 'i', '<M-BS>']);
Expand Down

0 comments on commit 22feebb

Please sign in to comment.