forked from qmk/qmk_userspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diablo_player_change.c
61 lines (57 loc) · 1.53 KB
/
diablo_player_change.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright 2024 Javier Oliver (@joliverMI)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include QMK_KEYBOARD_H
bool process_diablo_player_change(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case PL_1:
if (record->event.pressed) {
SEND_STRING("\n/players1\n");
}
return false;
break;
case PL_2:
if (record->event.pressed) {
SEND_STRING("\n/players2\n");
}
return false;
break;
case PL_3:
if (record->event.pressed) {
SEND_STRING("\n/players3\n");
}
return false;
break;
case PL_4:
if (record->event.pressed) {
SEND_STRING("\n/players4\n");
}
return false;
break;
case PL_5:
if (record->event.pressed) {
SEND_STRING("\n/players5\n");
}
return false;
break;
case PL_6:
if (record->event.pressed) {
SEND_STRING("\n/players6\n");
}
return false;
break;
case PL_7:
if (record->event.pressed) {
SEND_STRING("\n/players7\n");
}
return false;
break;
case PL_8:
if (record->event.pressed) {
SEND_STRING("\n/players8\n");
}
return false;
break;
}
return true;
}