Open cmpadden opened 6 years ago
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
@cmpadden thanks for raising this issue thats really helpful to know as its probably behind a lot of key binding issues, haven't had a look at that part of the code base but it should definitely not be looking for an exact match or rather should only work if the pattern matches the original
I spent some time looking at InputManager.ts
and KeyboardResolver.ts
in an
attempt to come up with a solution to this problem, but I'm not sure if I'm
making any progress. My initial idea was to modify the line that normalizes the
keychord in both the bind
and unbind
functions.
const normalizedKeyChord = keyChord.toLowerCase()
But, I'm not sure of all of the key combinations to account for, and how it might impact performance.
@Akin909, Do you have any suggestions that might point me in the right direction?
Thanks
Oni Version: 0.3.6 Operating System: MacOS
Issue: Unbinding default keybindings requires the order of the key-chord to match its original definition from oni/browser/src/Input/KeyBindings.ts.
Expected behavior:
oni.input.unbind("<c-s-b>")
unbinds sidebar.toggleActual behavior:
oni.input.unbind("<c-s-b>")
does not unbind sidebar.toggleoni.input.unbind("<s-c-b>")
does unbind sidebar.toggle