From 6fce4190f1db11390c38fa86fa9ad1ebf9a6cfc0 Mon Sep 17 00:00:00 2001 From: sago35 Date: Tue, 26 Dec 2023 10:13:10 +0900 Subject: [PATCH] Add d.Layer() --- keyboard.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboard.go b/keyboard.go index bb16c95..9597bb4 100644 --- a/keyboard.go +++ b/keyboard.go @@ -374,6 +374,10 @@ func (d *Device) SetKeycodeVia(layer, kbIndex, index int, key Keycode) { d.kb[kbIndex].SetKeycode(layer, index, kc) } +func (d *Device) Layer() int { + return d.layer +} + type Keycode k.Keycode type Keyboard struct {