diff --git a/devices/devicejson.go b/devices/devicejson.go index 95b59f2..53f3cf4 100644 --- a/devices/devicejson.go +++ b/devices/devicejson.go @@ -1,6 +1,11 @@ package devices -import "github.com/OrbTools/OrbCommon/gui" +import ( + "encoding/binary" + "io" + + "github.com/OrbTools/OrbCommon/gui" +) //ExtraBytes defines extra bytes to a type type ExtraBytes struct { @@ -19,3 +24,9 @@ type Device struct { var DeviceList = []string{ "Orbweaver", } + +//SavePKMKeymap saves an orb after edit +func SavePKMKeymap(mapped interface{}, file io.WriteCloser) { + binary.Write(file, binary.LittleEndian, mapped) + file.Close() +}