New notification system added that can be used by scripts or programs that want to send notifications through Fenrir. Separate from self-voicing.

This commit is contained in:
Storm Dragon committed 2026-11-04 22:12:47 -05:00
1 parent 8eacae13c0
commit c4e9cb4b75
20 files changed
+1331 -735

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
// Copyright (c) 2026 Storm Dragon
// SPDX-License-Identifier: GPL-3.0-or-later
package input
import (
"testing"
"git.stormux.org/storm/fenrir/internal/command"
)
func TestNotificationBindingsInBothLayouts(t *testing.T) {
for _, layout := range []string{"desktop", "laptop"} {
bindings, _, err := Load_bindings([]string{"../../config/keyboard/" + layout + ".toml"})
if err != nil {
t.Fatal(err)
}
for _, trial := range []struct {
ctrl bool
id command.ID
}{
{false, command.LastNotification}, {true, command.NotificationHistory},
} {
router, err := New_router(bindings)
if err != nil {
t.Fatal(err)
}
router.Key(0, KeyInsert, 1, false, false)
if trial.ctrl {
router.Key(0, KeyCtrl, 1, false, false)
}
if got := router.Key(0, 49, 1, false, false); got.Command != trial.id || got.Forward {
t.Fatal(layout, trial, got)
}
}
}
}