with comments for if stucts are needed later

This commit is contained in:
mbattista
2021-04-10 23:17:05 +00:00
parent be3453c37d
commit 79e3e153bd
3 changed files with 69 additions and 48 deletions

View File

@ -73,9 +73,12 @@ func KeyDown(code uint64) error {
return fmt.Errorf("debounced key %v", code)
}
fmt.Printf("Code-Press %v", code)
debounce_key[code] = time.Now()
C.XKey(C.ulong(code), C.int(1))
t := C.XKey(C.ulong(code), C.int(1))
fmt.Printf("X-Press %v", t)
return nil
}
@ -103,7 +106,10 @@ func KeyUp(code uint64) error {
delete(debounce_key, code)
C.XKey(C.ulong(code), C.int(0))
fmt.Printf("Code-Release %v", code)
t := C.XKey(C.ulong(code), C.int(0))
fmt.Printf("X-Release %v", t)
return nil
}