Files

18 lines
580 B
Go

// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package input
import "testing"
func TestVersionChord(t *testing.T) {
for _, layout := range []KeyboardLayout{DesktopKeyboardLayout, LaptopKeyboardLayout} {
router := NewCommandRouter([]uint32{0xff63}, DefaultCommandBindings(layout))
router.Handle(0xff63, 118, 0, true)
if consumed, command := router.Handle('v', 55, 1, true); !consumed || command != PresentVersion {
t.Fatalf("layout %d: Cthulhu+Shift+V = %v %q", layout, consumed, command)
}
}
}