feat: add hotkeys for select text in search input

This commit is contained in:
JimmFly
2022-12-20 16:40:28 +08:00
parent 5394513db5
commit 2f778e732c
@@ -58,6 +58,11 @@ export const Input = (props: {
}
}}
onKeyDown={(e: React.KeyboardEvent) => {
if (e.key === 'a' && e.metaKey) {
e.stopPropagation();
inputRef.current?.select();
return;
}
if (isComposition) {
if (
e.key === 'ArrowDown' ||