(code, base int)
| 81 | } |
| 82 | |
| 83 | func MouseModifiers(code, base int) int { |
| 84 | modeType := code - base |
| 85 | modifiers := 0 |
| 86 | if (modeType & 0b1000) != 0 { |
| 87 | modifiers |= ModControl |
| 88 | } |
| 89 | if (modeType & 0b1_0000) != 0 { |
| 90 | modifiers |= ModAlt |
| 91 | } |
| 92 | return modifiers |
| 93 | } |
| 94 | |
| 95 | func ParseMouseCode(code string) XkbdCode { |
| 96 | parts := strings.Split(code, ";") |
no outgoing calls
no test coverage detected