File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
2626 getActiveFunboxesWithFunction ,
2727 getActiveFunboxNames ,
2828} from "../../test/funbox/list" ;
29+ import { Keycode } from "../../constants/keys" ;
2930
3031export async function handleTab ( e : KeyboardEvent , now : number ) : Promise < void > {
3132 if ( Config . quickRestart === "tab" ) {
@@ -122,7 +123,7 @@ export async function handleOppositeShift(event: KeyboardEvent): Promise<void> {
122123 ) ;
123124 } else {
124125 setCorrectShiftUsed (
125- ShiftTracker . isUsingOppositeShift ( event . code as KeyConverter . Keycode ) ,
126+ ShiftTracker . isUsingOppositeShift ( event . code as Keycode ) ,
126127 ) ;
127128 }
128129}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as ConfigEvent from "../observables/config-event";
44import * as TestState from "../test/test-state" ;
55import * as KeyConverter from "../utils/key-converter" ;
66import { qs } from "../utils/dom" ;
7+ import { Keycode } from "../constants/keys" ;
78
89const monkeyEl = qs ( "#monkey" ) ;
910const monkeyFastEl = qs ( "#monkey .fast" ) ;
@@ -63,7 +64,7 @@ export function type(event: KeyboardEvent): void {
6364 if ( ! Config . monkey ) return ;
6465
6566 const { leftSide, rightSide } = KeyConverter . keycodeToKeyboardSide (
66- event . code as KeyConverter . Keycode ,
67+ event . code as Keycode ,
6768 ) ;
6869 if ( leftSide && rightSide ) {
6970 // if its a middle key handle special case
@@ -101,7 +102,7 @@ export function stop(event: KeyboardEvent): void {
101102 if ( ! Config . monkey ) return ;
102103
103104 const { leftSide, rightSide } = KeyConverter . keycodeToKeyboardSide (
104- event . code as KeyConverter . Keycode ,
105+ event . code as Keycode ,
105106 ) ;
106107 if ( leftSide && rightSide ) {
107108 // if middle key handle special case
Original file line number Diff line number Diff line change 11import Config from "../config" ;
2+ import { Keycode } from "../constants/keys" ;
23import * as KeyConverter from "../utils/key-converter" ;
34
45export let leftState = false ;
@@ -26,7 +27,7 @@ export function reset(): void {
2627 rightState = false ;
2728}
2829
29- export function isUsingOppositeShift ( keycode : KeyConverter . Keycode ) : boolean {
30+ export function isUsingOppositeShift ( keycode : Keycode ) : boolean {
3031 if ( ! leftState && ! rightState ) {
3132 return true ;
3233 }
You can’t perform that action at this time.
0 commit comments