SIGN IN SIGN UP

console.lua: flush keybinds before sending mp.input `opened` events

This commit uses the undocumented `mp.flush_keybindings()` method
to ensure that all `console.lua` keybinds are set before
sending the `opened` event to `mp.input` clients.

Previously, the keybinds would only be flushed when `console.lua` went
idle. As the `opened` event is sent before this happens, clients
processing the event may end up flushing their own keybinds before this
happens. This makes it unreliable to use the `opened` event to override
keybinds set by `console.lua`; for example, adding different
behaviour to `input.select` when using `Shift+Enter` instead of `Enter`.

This commit allows the `opened` callback to be used to safely override
`console.lua` keybinds.

.luacheckrc: move flush_keybindings to globals
C
CogentRedTester committed
0af0c137bb7452b67097fb138dca997324f44555
Parent: e09a1d1
Committed by Kacper Michajłow <kasper93@gmail.com> on 2/24/2026, 7:12:57 PM