Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] keydown and keyup events repeat if key is held down #177

Closed
chrisella opened this issue May 16, 2019 · 6 comments
Closed

[BUG] keydown and keyup events repeat if key is held down #177

chrisella opened this issue May 16, 2019 · 6 comments

Comments

@chrisella
Copy link

Describe the bug
Holding down a single key which is mapped continually triggers the handler until it is released.

How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
GlobalHotKeys

Expected behavior

I would expect to see the keydown action triggered once when the key is depressed and then nothing until I release when a keyup would occur.
What I actually see (which is highlighted by the fact I raise events in Redux for the down and up) is continuous down actions until I release.

image

Platform (please complete the following information):

  • 2.0.0-pre5
  • Chrome
  • Windows 10

APPLICABLE TO v2.0.0-pre1 AND ABOVE: ======================

HotKeys (GLOBAL-E0❤️-C0🔺): Registered keyMap:
 {
    "OPEN_CHAT": "enter",
    "CLOSE_CHAT": "esc",
    "TOGGLE_MEASURE_MODE": "m",
    "SHIFT_DOWN": {
        "sequence": "shift",
        "action": "keydown"
    },
    "SHIFT_UP": {
        "sequence": "shift",
        "action": "keyup"
    }
}
AbstractKeyEventStrategy.js:391 HotKeys (GLOBAL-E0❤️-C0🔺): Registered component:
 {
    "childIds": [],
    "parentId": null
}
AbstractKeyEventStrategy.js:422 HotKeys (GLOBAL-E0❤️-C0🔺): Registered component mount:
 {
    "childIds": [],
    "parentId": null
}
GlobalKeyEventStrategy.js:388 HotKeys (GLOBAL-C0🔺): Bound handler handleGlobalKeydown() to document.onkeydown()
GlobalKeyEventStrategy.js:388 HotKeys (GLOBAL-C0🔺): Bound handler handleGlobalKeypress() to document.onkeypress()
GlobalKeyEventStrategy.js:388 HotKeys (GLOBAL-C0🔺): Bound handler handleGlobalKeyup() to document.onkeyup()
GlobalKeyEventStrategy.js:241 HotKeys (GLOBAL-C0🔺): Mounted.
GlobalKeyEventStrategy.js:244 HotKeys (GLOBAL-C0🔺): Component options: 
 {
    "actions": {
        "OPEN_CHAT": [
            {
                "prefix": "",
                "actionName": "OPEN_CHAT",
                "sequenceLength": 1,
                "id": "Enter",
                "keyDictionary": {
                    "Enter": true
                },
                "eventBitmapIndex": 0,
                "size": 1
            }
        ],
        "CLOSE_CHAT": [
            {
                "prefix": "",
                "actionName": "CLOSE_CHAT",
                "sequenceLength": 1,
                "id": "Escape",
                "keyDictionary": {
                    "Escape": true
                },
                "eventBitmapIndex": 0,
                "size": 1
            }
        ],
        "TOGGLE_MEASURE_MODE": [
            {
                "prefix": "",
                "actionName": "TOGGLE_MEASURE_MODE",
                "sequenceLength": 1,
                "id": "m",
                "keyDictionary": {
                    "m": true
                },
                "eventBitmapIndex": 0,
                "size": 1
            }
        ],
        "SHIFT_DOWN": [
            {
                "prefix": "",
                "actionName": "SHIFT_DOWN",
                "sequenceLength": 1,
                "id": "Shift",
                "keyDictionary": {
                    "Shift": true
                },
                "eventBitmapIndex": 0,
                "size": 1
            }
        ],
        "SHIFT_UP": [
            {
                "prefix": "",
                "actionName": "SHIFT_UP",
                "sequenceLength": 1,
                "id": "Shift",
                "keyDictionary": {
                    "Shift": true
                },
                "eventBitmapIndex": 2,
                "size": 1
            }
        ]
    },
    "handlers": {
        "OPEN_CHAT": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }",
        "CLOSE_CHAT": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }",
        "TOGGLE_MEASURE_MODE": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }",
        "SHIFT_DOWN": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }",
        "SHIFT_UP": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
    },
    "componentId": 0,
    "options": {
        "defaultKeyEvent": "keydown"
    }
}
index.js:301 
    PixiJS 4.8.7 - ✰ WebGL ✰      http://www.pixijs.com/    ♥♥♥ 
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E1💚): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:614 HotKeys (GLOBAL-E1💚): Added 'Shift' to current combination: 'Shift'.
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E1💚): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E1💚): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E1💚-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            }
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E1💚-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E1💚-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E1💚): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E2💙): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E2💙): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E2💙): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E3💛): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E3💛): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E3💛): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E3💛): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E3💛-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E3💛-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E3💛-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E3💛): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E4💜): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E4💜): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E4💜): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E5🧡): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E5🧡): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E5🧡): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E5🧡): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E5🧡-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E5🧡-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E5🧡-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E5🧡): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E6❤️): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E6❤️): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E6❤️): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E7💚): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E7💚): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E7💚): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E7💚): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E7💚-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E7💚-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E7💚-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E7💚): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E8💙): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E8💙): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E8💙): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E9💛): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E9💛): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E9💛): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E9💛): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E9💛-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E9💛-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E9💛-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E9💛): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E10💜): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E10💜): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E10💜): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E11🧡): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E11🧡): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E11🧡): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E11🧡): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E11🧡-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E11🧡-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E11🧡-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E11🧡): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E12❤️): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E12❤️): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E12❤️): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E13💚): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E13💚): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E13💚): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E13💚): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E13💚-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E13💚-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E13💚-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E13💚): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E14💙): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E14💙): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E14💙): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E15💛): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E15💛): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E15💛): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E15💛): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E15💛-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E15💛-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E15💛-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E15💛): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E16💜): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E16💜): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E16💜): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E17🧡): New 'Shift' keydown event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:605 HotKeys (GLOBAL-E17🧡): Started a new combination with 'Shift'.
GlobalKeyEventStrategy.js:606 HotKeys (GLOBAL-E17🧡): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    false,
                    false,
                    false
                ],
                [
                    true,
                    false,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E17🧡): Attempting to find action matching 'Shift' keydown . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E17🧡-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E17🧡-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_DOWN. Calling handler . . .
App.tsx:39 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E17🧡-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E17🧡): Searching no further, as handler has been found (and called).
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E18❤️): New (simulated) 'Shift' keypress event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E18❤️): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:668 HotKeys (GLOBAL-E18❤️): Ignored 'Shift' keypress because it doesn't have any keypress handlers.
GlobalKeyEventStrategy.js:474 HotKeys (GLOBAL-E19💚): New 'Shift' keyup event (that has NOT passed through React app).
GlobalKeyEventStrategy.js:617 HotKeys (GLOBAL-E19💚): Key history: [
    {
        "keys": {
            "Shift": [
                [
                    true,
                    false,
                    false
                ],
                [
                    true,
                    true,
                    false
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    },
    {
        "keys": {
            "Shift": [
                [
                    true,
                    true,
                    false
                ],
                [
                    true,
                    true,
                    true
                ]
            ]
        },
        "ids": [
            "Shift"
        ],
        "keyAliases": {}
    }
].
GlobalKeyEventStrategy.js:659 HotKeys (GLOBAL-E19💚): Attempting to find action matching 'Shift' keyup . . .
AbstractKeyEventStrategy.js:975 HotKeys (GLOBAL-E19💚-C0🔺): Internal key mapping:
 {
    "sequences": {
        "": {
            "combinations": {
                "Enter": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Enter",
                    "keyDictionary": {
                        "Enter": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "OPEN_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function OPEN_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"openChat\"])());\n  }"
                        }
                    }
                },
                "Escape": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Escape",
                    "keyDictionary": {
                        "Escape": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "CLOSE_CHAT",
                            "eventBitmapIndex": 0,
                            "handler": "function CLOSE_CHAT(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_chat__WEBPACK_IMPORTED_MODULE_23__[\"closeChat\"])());\n  }"
                        }
                    }
                },
                "m": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "m",
                    "keyDictionary": {
                        "m": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "TOGGLE_MEASURE_MODE",
                            "eventBitmapIndex": 0,
                            "handler": "function TOGGLE_MEASURE_MODE(event) {\n    return _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_maps__WEBPACK_IMPORTED_MODULE_24__[\"mapsToggleMeasureMode\"])());\n  }"
                        }
                    }
                },
                "Shift": {
                    "prefix": "",
                    "sequenceLength": 1,
                    "id": "Shift",
                    "keyDictionary": {
                        "Shift": true
                    },
                    "size": 1,
                    "events": {
                        "0": {
                            "actionName": "SHIFT_DOWN",
                            "eventBitmapIndex": 0,
                            "handler": "function SHIFT_DOWN(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyDownShiftAction\"])());\n  }"
                        },
                        "2": {
                            "actionName": "SHIFT_UP",
                            "eventBitmapIndex": 2,
                            "handler": "function SHIFT_UP(event) {\n    console.log(event);\n    _redux_store__WEBPACK_IMPORTED_MODULE_15__[\"default\"].store.dispatch(Object(_redux_actions_keys__WEBPACK_IMPORTED_MODULE_25__[\"keyUpShiftAction\"])());\n  }"
                        }
                    }
                }
            },
            "order": [
                "Enter",
                "Escape",
                "m",
                "Shift"
            ]
        }
    },
    "eventBitmap": [
        true,
        false,
        true
    ],
    "longestSequence": 1
}
AbstractKeyEventStrategy.js:1036 HotKeys (GLOBAL-E19💚-C0🔺): Found action that matches 'Shift' (sub-match: 'Shift'): SHIFT_UP. Calling handler . . .
App.tsx:43 KeyboardEvent {isTrusted: true, key: "Shift", code: "ShiftLeft", location: 1, ctrlKey: false, …}
GlobalKeyEventStrategy.js:686 HotKeys (GLOBAL-E19💚-C0🔺): Stopping further event propagation.
GlobalKeyEventStrategy.js:678 HotKeys (GLOBAL-E19💚): Searching no further, as handler has been found (and called).
KeyEventManager.js:183 HotKeys: Window focused - clearing key history

What Configuration options are you using?

None

@greena13
Copy link
Owner

Hi @chrisella, thanks for the great write-up.

This is a strange one.

You are correct, that when you hold down shift, it should only trigger the keydown handler once. And this is indeed the case when I try and reproduce your issue. What puzzles me is from the logs you have so helpfully provided, is the browser is triggering more shift keydown events before it's triggered a keyup event. That is, these "duplicate" keydown events are coming from outside of react-hotkeys.

My only guess at this point is it has something to do with the way triggering your Redux events is causing the JavaScript engine to switch between evaluating events. The other possibility is that somehow react-hotkeys is binding to document and listening multiple times for the same event. Are you experiencing these issues after a period of development with hot reloading turned on? Perhaps each hot reload is somehow causing react-hotkeys to re-init and add lots of new listeners.

@shtrih
Copy link

shtrih commented May 20, 2019

Hey, check this out: ccampbell/mousetrap#128 (comment)

@chrisella
Copy link
Author

Thanks @shtrih ! That's working a charm, I never knew that existed on the event data.

@greena13
Copy link
Owner

greena13 commented Jun 2, 2019

Hey @chrisella. I'm afraid I still can't reproduce your issue, however I've fixed some issues similar to this one in v2.0.0-pre7. Are you able to confirm whether it's still happening?

@greena13
Copy link
Owner

greena13 commented Jun 8, 2019

I'm happy to report that I was finally able to reproduce this issue and craft a fix. It should go out in the next release.

@greena13
Copy link
Owner

Fix is now available in v2.0.0-pre8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants