Skip to content

Commit 494b990

Browse files
committed
no ESC; delay after slash
1 parent 15e6894 commit 494b990

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

Macropad_Hotkeys/macros/minecraft-messages.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@
66

77
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
88

9-
DELAY_AFTER_ESCAPE = 0.05
9+
# NOTE: There appears to be some delay when bringing up the command screen.
10+
11+
DELAY_AFTER_SLASH = 0.80 # required so minecraft has time to bring up command screen
12+
13+
14+
# NOTE: On PC, characters are sometimes lost due to lag. No simple fix for
15+
# lost keystrokes is known. However, the commands do work most of the time.
16+
1017

1118
app = { # REQUIRED dict, must be named 'app'
1219
'name' : 'Minecraft (/msg)', # Application name
1320
'macros' : [ # List of button macros...
1421
# COLOR LABEL KEY SEQUENCE
1522
# 1st row ----------
1623
(0x000020, 'list', [
17-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
18-
'/list',
24+
'/', DELAY_AFTER_SLASH,
25+
'list',
1926
Keycode.RETURN, -Keycode.RETURN]),
2027
(0x000020, 'list', [
21-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
22-
'/list',
28+
'/', DELAY_AFTER_SLASH,
29+
'list',
2330
Keycode.RETURN, -Keycode.RETURN]),
2431
(0x000020, 'list', [
25-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
26-
'/list',
32+
'/', DELAY_AFTER_SLASH,
33+
'list',
2734
Keycode.RETURN, -Keycode.RETURN]),
2835
# 2nd row ----------
2936
(0x000000, '', []),
@@ -35,16 +42,16 @@
3542
(0x000000, '', []),
3643
# 4th row ----------
3744
(0x101010, 'bed', [
38-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
39-
'/msg @a Time for bed!',
45+
'/', DELAY_AFTER_SLASH,
46+
'msg @a Time for bed!',
4047
Keycode.RETURN, -Keycode.RETURN]),
4148
(0x101010, 'bed', [
42-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
43-
'/msg @a Time for bed!',
49+
'/', DELAY_AFTER_SLASH,
50+
'msg @a Time for bed!',
4451
Keycode.RETURN, -Keycode.RETURN]),
4552
(0x101010, 'bed', [
46-
Keycode.ESCAPE, -Keycode.ESCAPE, DELAY_AFTER_ESCAPE,
47-
'/msg @a Time for bed!',
53+
'/', DELAY_AFTER_SLASH,
54+
'msg @a Time for bed!',
4855
Keycode.RETURN, -Keycode.RETURN]),
4956
# Encoder button ---
5057
(0x000000, '', [])

0 commit comments

Comments
 (0)