From ad59e1b92a784252d78d8114603df5d5168992b0 Mon Sep 17 00:00:00 2001 From: Minizbot2012 Date: Tue, 9 Feb 2021 14:35:04 -0800 Subject: [PATCH] refactor --- common/{ => gui}/guibuilder.go | 2 +- common/{ => hid}/hid.go | 2 +- devices/orbweaver/orbweaver.go | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) rename common/{ => gui}/guibuilder.go (95%) rename common/{ => hid}/hid.go (98%) diff --git a/common/guibuilder.go b/common/gui/guibuilder.go similarity index 95% rename from common/guibuilder.go rename to common/gui/guibuilder.go index e3ea821..1b95a46 100644 --- a/common/guibuilder.go +++ b/common/gui/guibuilder.go @@ -1,4 +1,4 @@ -package common +package gui type PageType int diff --git a/common/hid.go b/common/hid/hid.go similarity index 98% rename from common/hid.go rename to common/hid/hid.go index 5b69777..721a2d4 100644 --- a/common/hid.go +++ b/common/hid/hid.go @@ -1,4 +1,4 @@ -package common +package hid var KEYCODE_WINDOWS_FROM_HID = []byte{ 255, 255, 255, 255, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, diff --git a/devices/orbweaver/orbweaver.go b/devices/orbweaver/orbweaver.go index 30496cc..6c2d747 100644 --- a/devices/orbweaver/orbweaver.go +++ b/devices/orbweaver/orbweaver.go @@ -5,20 +5,20 @@ import ( "io" "os" - "github.com/OrbTools/OrbCommon/common" + "github.com/OrbTools/OrbCommon/common/gui" ) //BINDING Map of Default Keys var BINDING = [...]byte{41, 2, 3, 4, 5, 15, 16, 17, 18, 19, 58, 30, 31, 32, 33, 42, 44, 45, 46, 47, 56, 103, 106, 108, 105, 57} //GUI gui definition for an orbweaver -var GUI = &common.GUI{ - Pages: []common.Page{ +var GUI = &gui.GUI{ + Pages: []gui.Page{ { Hive: "MIP", Name: "Grid", - Type: common.PGrid, - Keys: []common.Key{ + Type: gui.PGrid, + Keys: []gui.Key{ { KeyID: 0, KeyName: "01", @@ -81,8 +81,8 @@ var GUI = &common.GUI{ }, { Hive: "SIP", Name: "Side Keys", - Type: common.PList, - Keys: []common.Key{ + Type: gui.PList, + Keys: []gui.Key{ { KeyID: 0, KeyName: "Upper Button",