Added String method to Modifiers
This commit is contained in:
@@ -67,10 +67,11 @@ func main() {
|
||||
xevent.KeyPressFun(
|
||||
func(X *xgbutil.XUtil, e xevent.KeyPressEvent) {
|
||||
symbol, character := xgbkb.KeycodeToKeysym( e.Detail, e.State)
|
||||
modifiers := xgbkb.StateToModifiers(e.State)
|
||||
if unicode.IsPrint(character) {
|
||||
log.Printf("0x%04X | '%s'\n", symbol, string(character))
|
||||
log.Printf("0x%04X | '%s' %v\n", symbol, string(character), modifiers)
|
||||
} else {
|
||||
log.Printf("0x%04X |\n", symbol)
|
||||
log.Printf("0x%04X | %v\n", symbol, modifiers)
|
||||
}
|
||||
|
||||
if keybind.KeyMatch(X, "Escape", e.State, e.Detail) {
|
||||
|
||||
Reference in New Issue
Block a user