@@ -26,21 +26,23 @@ export class InputController {
2626
2727 this . keyRepeatDelay -= delta ;
2828
29- if ( this . engine . input . keyboard . wasReleased ( Keys . Left ) && this . keyRepeatDelay <= 0 ) {
29+ const keyboard = this . engine . input . keyboard ;
30+
31+ if ( ( keyboard . wasReleased ( Keys . Left ) || keyboard . wasReleased ( Keys . H ) ) && this . keyRepeatDelay <= 0 ) {
3032 this . keyRepeatDelay = this . KEY_REPEAT_INTERVAL ;
3133 this . handlers . move ( - 1 , 0 ) ;
32- } else if ( this . engine . input . keyboard . wasReleased ( Keys . Right ) && this . keyRepeatDelay <= 0 ) {
34+ } else if ( ( keyboard . wasReleased ( Keys . Right ) || keyboard . wasReleased ( Keys . L ) ) && this . keyRepeatDelay <= 0 ) {
3335 this . keyRepeatDelay = this . KEY_REPEAT_INTERVAL ;
3436 this . handlers . move ( 1 , 0 ) ;
35- } else if ( this . engine . input . keyboard . isHeld ( Keys . Left ) && this . keyRepeatDelay <= 0 ) {
37+ } else if ( ( keyboard . isHeld ( Keys . Left ) || keyboard . isHeld ( Keys . H ) ) && this . keyRepeatDelay <= 0 ) {
3638 this . keyRepeatDelay = this . KEY_REPEAT_INTERVAL ;
3739 this . handlers . move ( - 1 , 0 ) ;
38- } else if ( this . engine . input . keyboard . isHeld ( Keys . Right ) && this . keyRepeatDelay <= 0 ) {
40+ } else if ( ( keyboard . isHeld ( Keys . Right ) || keyboard . isHeld ( Keys . L ) ) && this . keyRepeatDelay <= 0 ) {
3941 this . keyRepeatDelay = this . KEY_REPEAT_INTERVAL ;
4042 this . handlers . move ( 1 , 0 ) ;
41- } else if ( this . engine . input . keyboard . wasPressed ( Keys . Up ) ) {
43+ } else if ( keyboard . wasPressed ( Keys . Up ) || keyboard . wasPressed ( Keys . R ) ) {
4244 this . handlers . rotate ( ) ;
43- } else if ( this . engine . input . keyboard . wasPressed ( Keys . Down ) ) {
45+ } else if ( keyboard . wasPressed ( Keys . Down ) || keyboard . wasPressed ( Keys . J ) ) {
4446 this . handlers . hardDrop ( ) ;
4547 }
4648 }
0 commit comments