MCPcopy
hub / github.com/mmulet/term.everything / MouseModifiers

Function MouseModifiers

termeverything/PointerCode.go:83–93  ·  view source on GitHub ↗
(code, base int)

Source from the content-addressed store, hash-verified

81}
82
83func 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
95func ParseMouseCode(code string) XkbdCode {
96 parts := strings.Split(code, ";")

Callers 2

ParseMouseCodeFunction · 0.85
PointerCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected