(data []byte)
| 183 | } |
| 184 | |
| 185 | func parse_length_2(data []byte) []XkbdCode { |
| 186 | if len(data) < 2 { |
| 187 | return nil |
| 188 | } |
| 189 | if data[0] == 27 { |
| 190 | out := KeycodeSingleCodes(int(data[1])) |
| 191 | if out == nil { |
| 192 | return nil |
| 193 | } |
| 194 | out.Modifiers |= ModAlt |
| 195 | return []XkbdCode{out} |
| 196 | } |
| 197 | out := make([]XkbdCode, 0, 2) |
| 198 | if out1 := KeycodeSingleCodes(int(data[0])); out1 != nil { |
| 199 | out = append(out, out1) |
| 200 | } |
| 201 | if out2 := KeycodeSingleCodes(int(data[1])); out2 != nil { |
| 202 | out = append(out, out2) |
| 203 | } |
| 204 | return out |
| 205 | } |
| 206 | |
| 207 | func parse_length_3(data []byte) []XkbdCode { |
| 208 | if len(data) < 3 { |
no test coverage detected