mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
feat: add hotkeys for select text in search input
This commit is contained in:
@@ -58,6 +58,11 @@ export const Input = (props: {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onKeyDown={(e: React.KeyboardEvent) => {
|
onKeyDown={(e: React.KeyboardEvent) => {
|
||||||
|
if (e.key === 'a' && e.metaKey) {
|
||||||
|
e.stopPropagation();
|
||||||
|
inputRef.current?.select();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isComposition) {
|
if (isComposition) {
|
||||||
if (
|
if (
|
||||||
e.key === 'ArrowDown' ||
|
e.key === 'ArrowDown' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user