aboutsummaryrefslogtreecommitdiff
path: root/components/keybindselector.tsx
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-06-20 15:58:23 +0200
committerlonkaars <loek@pipeframe.xyz>2021-06-20 15:58:23 +0200
commitcdacdc98039cde3a53c0d3efbbe0444490c7cf77 (patch)
treead0b8aafa401fd2ae19f7e97da851c63a961c119 /components/keybindselector.tsx
parent4d9301fdc0bb64f34906afcb7a22cbe0d4e42627 (diff)
add arrow key mapping
Diffstat (limited to 'components/keybindselector.tsx')
-rw-r--r--components/keybindselector.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/keybindselector.tsx b/components/keybindselector.tsx
index b7deed8..26eb222 100644
--- a/components/keybindselector.tsx
+++ b/components/keybindselector.tsx
@@ -1,7 +1,7 @@
import FilledInput from '@material-ui/core/FilledInput';
import FormControl from '@material-ui/core/FormControl';
import InputLabel from '@material-ui/core/InputLabel';
-import { useEffect, useRef, useState } from 'react';
+import { useState } from 'react';
import { v4 as uuid } from 'uuid';
function Keybind(props: {
@@ -19,6 +19,10 @@ var keyBlacklist = [
];
var keyMap = {
' ': 'Space',
+ 'ArrowDown': 'Down',
+ 'ArrowLeft': 'Left',
+ 'ArrowRight': 'Right',
+ 'ArrowUp': 'Up',
};
export default function KeybindSelector(props: {