mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { KeyboardEvent } from 'react';
|
||||
|
||||
class KeyboardHelper {
|
||||
public eventHelper: EventHelper;
|
||||
|
||||
constructor() {
|
||||
this.eventHelper = new EventHelper();
|
||||
}
|
||||
}
|
||||
|
||||
class EventHelper {
|
||||
isSelectAll(event: KeyboardEvent) {
|
||||
if ((event.ctrlKey || event.metaKey) && event.code === 'KeyA') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export const keyboardHelper = new KeyboardHelper();
|
||||
Reference in New Issue
Block a user