feat: add keyboard shortcuts

This commit is contained in:
Fernando Porazzi
2023-10-10 23:27:27 +02:00
parent 237ce498b7
commit b0d84779c8
3 changed files with 71 additions and 2 deletions

View File

@ -494,3 +494,11 @@ export function kvToObject<T>(o: string, sep?: string) {
export function defaultAvatar(input: string) {
return `https://robohash.v0l.io/${input}.png`;
}
export function isFormElement(target: HTMLElement): boolean {
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
return true;
}
return false;
}