Add global command bypass with Cthulhu+Z

This commit is contained in:
ak47 committed 2026-11-07 22:07:03 -05:00
1 parent d01965c00d
commit 4c95c9f278
26 files changed
+657 -18

No files matched your search

+5 -2
View File
@@ -159,7 +159,10 @@ func configure_native_bindings(device *C.CommandDevice, layout input.KeyboardLay
}
global := resolvedBindings(layout, false, overrides)
browse := resolvedBindings(layout, true, overrides)
if ocrReview {
if device.bypass != 0 {
global = input.BypassCommandBindings(global)
browse = global
} else if ocrReview {
browse = input.OCRCommandBindings(global)
if len(pending) > 0 && pending[0] {
browse = input.OCRPendingBindings(global)
@@ -202,7 +205,7 @@ func configure_native_bindings(device *C.CommandDevice, layout input.KeyboardLay
// Own Control/Shift from their press in temporary review. Otherwise the
// application can see a modifier press whose release the arrow grab owns.
// Unbound chords are replayed whole after all their physical keys release.
if ocrReview && !(len(pending) > 0 && pending[0]) {
if device.bypass == 0 && ocrReview && !(len(pending) > 0 && pending[0]) {
for _, symbol := range []uint32{0xffe1, 0xffe2, 0xffe3, 0xffe4} {
for _, mask := range []uint16{0, 1, 4, 5} {
native = append(native, C.NativeBinding{symbol: C.ulong(symbol), modifiers: C.uint(mask), browseOnly: 1})