We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'go <arrow keys>' conflicts with generic_editor 'go left/right/up/down'
This is really only a problem if the edit actions are overridden, but one might want to do so for `vim`...

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `code/keys.py`
Content:
```
1 from typing import Set
2 
3 from talon import Module, Context, actions, app
4 import sys
5 
6 default_alphabet = "air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip".split(
7     " "
8 )
9 letters_string = "abcdefghijklmnopqrstuvwxyz"
10 
11 default_digits = "zero one two three four five six seven eight nine".split(" ")
12 numbers = [str(i) for i in range(10)]
13 default_f_digits = "one two three four five six seven eight nine ten eleven twelve".split(
14     " "
15 )
16 
17 mod = Module()
18 mod.list("letter", desc="The spoken phonetic alphabet")
19 mod.list("symbol_key", desc="All symbols from the keyboard")
20 mod.list("arrow_key", desc="All arrow keys")
21 mod.list("number_key", desc="All number keys")
22 mod.list("modifier_key", desc="All modifier keys")
23 mod.list("function_key", desc="All function keys")
24 mod.list("special_key", desc="All special keys")
25 mod.list("punctuation", desc="words for inserting punctuation into text")
26 
27 
28 @mod.capture(rule="{self.modifier_key}+")
29 def modifiers(m) -> str:
30     "One or more modifier keys"
31     return "-".join(m.modifier_key_list)
32 
33 
34 @mod.capture(rule="{self.arrow_key}")
35 def arrow_key(m) -> str:
36     "One directional arrow key"
37     return m.arrow_key
38 
39 
40 @mod.capture(rule="<self.arrow_key>+")
41 def arrow_keys(m) -> str:
42     "One or more arrow keys separated by a space"
43     return str(m)
44 
45 
46 @mod.capture(rule="{self.number_key}")
47 def number_key(m) -> str:
48     "One number key"
49     return m.number_key
50 
51 
52 @mod.capture(rule="{self.letter}")
53 def letter(m) -> str:
54     "One letter key"
55     return m.letter
56 
57 
58 @mod.capture(rule="{self.special_key}")
59 def special_key(m) -> str:
60     "One special key"
61     return m.special_key
62 
63 
64 @mod.capture(rule="{self.symbol_key}")
65 def symbol_key(m) -> str:
66     "One symbol key"
67     return m.symbol_key
68 
69 
70 @mod.capture(rule="{self.function_key}")
71 def function_key(m) -> str:
72     "One function key"
73     return m.function_key
74 
75 
76 @mod.capture(rule="( <self.letter> | <self.number_key> | <self.symbol_key> )")
77 def any_alphanumeric_key(m) -> str:
78     "any alphanumeric key"
79     return str(m)
80 
81 
82 @mod.capture(
83     rule="( <self.letter> | <self.number_key> | <self.symbol_key> "
84     "| <self.arrow_key> | <self.function_key> | <self.special_key> )"
85 )
86 def unmodified_key(m) -> str:
87     "A single key with no modifiers"
88     return str(m)
89 
90 
91 @mod.capture(rule="{self.modifier_key}* <self.unmodified_key>")
92 def key(m) -> str:
93     "A single key with optional modifiers"
94     try:
95         mods = m.modifier_key_list
96     except AttributeError:
97         mods = []
98     return "-".join(mods + [m.unmodified_key])
99 
100 
101 @mod.capture(rule="<self.key>+")
102 def keys(m) -> str:
103     "A sequence of one or more keys with optional modifiers"
104     return " ".join(m.key_list)
105 
106 
107 @mod.capture(rule="{self.letter}+")
108 def letters(m) -> str:
109     "Multiple letter keys"
110     return "".join(m.letter_list)
111 
112 
113 ctx = Context()
114 modifier_keys = {
115     # If you find 'alt' is often misrecognized, try using 'alter'.
116     "alt": "alt",  #'alter': 'alt',
117     "control": "ctrl",  #'troll':   'ctrl',
118     "shift": "shift",  #'sky':     'shift',
119     "super": "super",
120 }
121 if app.platform  == "mac":
122     modifier_keys["command"] = "cmd"
123     modifier_keys["option"] = "alt"
124 ctx.lists["self.modifier_key"] = modifier_keys
125 alphabet = dict(zip(default_alphabet, letters_string))
126 ctx.lists["self.letter"] = alphabet
127 
128 # `punctuation_words` is for words you want available BOTH in dictation and as key names in command mode.
129 # `symbol_key_words` is for key names that should be available in command mode, but NOT during dictation.
130 punctuation_words = {
131     # TODO: I'm not sure why we need these, I think it has something to do with
132     # Dragon. Possibly it has been fixed by later improvements to talon? -rntz
133     "`": "`",
134     ",": ",",  # <== these things
135     "back tick": "`",
136     "grave": "`",
137     "comma": ",",
138     "period": ".",
139     "full stop": ".",
140     "semicolon": ";",
141     "colon": ":",
142     "forward slash": "/",
143     "question mark": "?",
144     "exclamation mark": "!",
145     "exclamation point": "!",
146     "asterisk": "*",
147     "hash sign": "#",
148     "number sign": "#",
149     "percent sign": "%",
150     "at sign": "@",
151     "and sign": "&",
152     "ampersand": "&",
153 
154     # Currencies
155     "dollar sign": "$",
156     "pound sign": "£",
157 }
158 symbol_key_words = {
159     "dot": ".",
160     "point": ".",
161     "quote": "'",
162     "apostrophe": "'",
163     "L square": "[",
164     "left square": "[",
165     "square": "[",
166     "R square": "]",
167     "right square": "]",
168     "slash": "/",
169     "backslash": "\\",
170     "minus": "-",
171     "dash": "-",
172     "equals": "=",
173     "plus": "+",
174     "tilde": "~",
175     "bang": "!",
176     "down score": "_",
177     "under score": "_",
178     "paren": "(",
179     "L paren": "(",
180     "left paren": "(",
181     "R paren": ")",
182     "right paren": ")",
183     "brace": "{",
184     "left brace": "{",
185     "R brace": "}",
186     "right brace": "}",
187     "angle": "<",
188     "left angle": "<",
189     "less than": "<",
190     "rangle": ">",
191     "R angle": ">",
192     "right angle": ">",
193     "greater than": ">",
194     "star": "*",
195     "hash": "#",
196     "percent": "%",
197     "caret": "^",
198     "amper": "&",
199     "pipe": "|",
200     "dubquote": '"',
201     "double quote": '"',
202 
203     # Currencies
204     "dollar": "$",
205     "pound": "£",
206 }
207 
208 # make punctuation words also included in {user.symbol_keys}
209 symbol_key_words.update(punctuation_words)
210 ctx.lists["self.punctuation"] = punctuation_words
211 ctx.lists["self.symbol_key"] = symbol_key_words
212 ctx.lists["self.number_key"] = dict(zip(default_digits, numbers))
213 ctx.lists["self.arrow_key"] = {
214     "down": "down",
215     "left": "left",
216     "right": "right",
217     "up": "up",
218 }
219 
220 simple_keys = [
221     "end",
222     "enter",
223     "escape",
224     "home",
225     "insert",
226     "pagedown",
227     "pageup",
228     "space",
229     "tab",
230 ]
231 
232 alternate_keys = {
233     "delete": "backspace",
234     "forward delete": "delete",
235     #'junk': 'backspace',
236     "page up": "pageup",
237     "page down": "pagedown",
238 }
239 # mac apparently doesn't have the menu key.
240 if app.platform in ("windows", "linux"):
241     alternate_keys["menu key"] = "menu"
242     alternate_keys["print screen"] = "printscr"
243 
244 special_keys = {k: k for k in simple_keys}
245 special_keys.update(alternate_keys)
246 ctx.lists["self.special_key"] = special_keys
247 ctx.lists["self.function_key"] = {
248     f"F {default_f_digits[i]}": f"f{i + 1}" for i in range(12)
249 }
250 
251 
252
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/code/keys.py b/code/keys.py
--- a/code/keys.py
+++ b/code/keys.py
@@ -249,3 +249,12 @@
 }
 
 
+@mod.action_class
+class Actions:
+    def move_cursor(s: str):
+        """Given a sequence of directions, eg. 'left left up', moves the cursor accordingly using edit.{left,right,up,down}."""
+        for d in s.split():
+            if d in ('left','right','up','down'):
+                getattr(actions.edit, d)()
+            else:
+                raise RuntimeError(f'invalid arrow key: {d}')

{"golden_diff": "diff --git a/code/keys.py b/code/keys.py\n--- a/code/keys.py\n+++ b/code/keys.py\n@@ -249,3 +249,12 @@\n }\n \n \n+@mod.action_class\n+class Actions:\n+    def move_cursor(s: str):\n+        \"\"\"Given a sequence of directions, eg. 'left left up', moves the cursor accordingly using edit.{left,right,up,down}.\"\"\"\n+        for d in s.split():\n+            if d in ('left','right','up','down'):\n+                getattr(actions.edit, d)()\n+            else:\n+                raise RuntimeError(f'invalid arrow key: {d}')\n", "issue": "'go <arrow keys>' conflicts with generic_editor 'go left/right/up/down'\nThis is really only a problem if the edit actions are overridden, but one might want to do so for `vim`...\n", "before_files": [{"content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n    \" \"\n)\nletters_string = \"abcdefghijklmnopqrstuvwxyz\"\n\ndefault_digits = \"zero one two three four five six seven eight nine\".split(\" \")\nnumbers = [str(i) for i in range(10)]\ndefault_f_digits = \"one two three four five six seven eight nine ten eleven twelve\".split(\n    \" \"\n)\n\nmod = Module()\nmod.list(\"letter\", desc=\"The spoken phonetic alphabet\")\nmod.list(\"symbol_key\", desc=\"All symbols from the keyboard\")\nmod.list(\"arrow_key\", desc=\"All arrow keys\")\nmod.list(\"number_key\", desc=\"All number keys\")\nmod.list(\"modifier_key\", desc=\"All modifier keys\")\nmod.list(\"function_key\", desc=\"All function keys\")\nmod.list(\"special_key\", desc=\"All special keys\")\nmod.list(\"punctuation\", desc=\"words for inserting punctuation into text\")\n\n\n@mod.capture(rule=\"{self.modifier_key}+\")\ndef modifiers(m) -> str:\n    \"One or more modifier keys\"\n    return \"-\".join(m.modifier_key_list)\n\n\n@mod.capture(rule=\"{self.arrow_key}\")\ndef arrow_key(m) -> str:\n    \"One directional arrow key\"\n    return m.arrow_key\n\n\n@mod.capture(rule=\"<self.arrow_key>+\")\ndef arrow_keys(m) -> str:\n    \"One or more arrow keys separated by a space\"\n    return str(m)\n\n\n@mod.capture(rule=\"{self.number_key}\")\ndef number_key(m) -> str:\n    \"One number key\"\n    return m.number_key\n\n\n@mod.capture(rule=\"{self.letter}\")\ndef letter(m) -> str:\n    \"One letter key\"\n    return m.letter\n\n\n@mod.capture(rule=\"{self.special_key}\")\ndef special_key(m) -> str:\n    \"One special key\"\n    return m.special_key\n\n\n@mod.capture(rule=\"{self.symbol_key}\")\ndef symbol_key(m) -> str:\n    \"One symbol key\"\n    return m.symbol_key\n\n\n@mod.capture(rule=\"{self.function_key}\")\ndef function_key(m) -> str:\n    \"One function key\"\n    return m.function_key\n\n\n@mod.capture(rule=\"( <self.letter> | <self.number_key> | <self.symbol_key> )\")\ndef any_alphanumeric_key(m) -> str:\n    \"any alphanumeric key\"\n    return str(m)\n\n\n@mod.capture(\n    rule=\"( <self.letter> | <self.number_key> | <self.symbol_key> \"\n    \"| <self.arrow_key> | <self.function_key> | <self.special_key> )\"\n)\ndef unmodified_key(m) -> str:\n    \"A single key with no modifiers\"\n    return str(m)\n\n\n@mod.capture(rule=\"{self.modifier_key}* <self.unmodified_key>\")\ndef key(m) -> str:\n    \"A single key with optional modifiers\"\n    try:\n        mods = m.modifier_key_list\n    except AttributeError:\n        mods = []\n    return \"-\".join(mods + [m.unmodified_key])\n\n\n@mod.capture(rule=\"<self.key>+\")\ndef keys(m) -> str:\n    \"A sequence of one or more keys with optional modifiers\"\n    return \" \".join(m.key_list)\n\n\n@mod.capture(rule=\"{self.letter}+\")\ndef letters(m) -> str:\n    \"Multiple letter keys\"\n    return \"\".join(m.letter_list)\n\n\nctx = Context()\nmodifier_keys = {\n    # If you find 'alt' is often misrecognized, try using 'alter'.\n    \"alt\": \"alt\",  #'alter': 'alt',\n    \"control\": \"ctrl\",  #'troll':   'ctrl',\n    \"shift\": \"shift\",  #'sky':     'shift',\n    \"super\": \"super\",\n}\nif app.platform  == \"mac\":\n    modifier_keys[\"command\"] = \"cmd\"\n    modifier_keys[\"option\"] = \"alt\"\nctx.lists[\"self.modifier_key\"] = modifier_keys\nalphabet = dict(zip(default_alphabet, letters_string))\nctx.lists[\"self.letter\"] = alphabet\n\n# `punctuation_words` is for words you want available BOTH in dictation and as key names in command mode.\n# `symbol_key_words` is for key names that should be available in command mode, but NOT during dictation.\npunctuation_words = {\n    # TODO: I'm not sure why we need these, I think it has something to do with\n    # Dragon. Possibly it has been fixed by later improvements to talon? -rntz\n    \"`\": \"`\",\n    \",\": \",\",  # <== these things\n    \"back tick\": \"`\",\n    \"grave\": \"`\",\n    \"comma\": \",\",\n    \"period\": \".\",\n    \"full stop\": \".\",\n    \"semicolon\": \";\",\n    \"colon\": \":\",\n    \"forward slash\": \"/\",\n    \"question mark\": \"?\",\n    \"exclamation mark\": \"!\",\n    \"exclamation point\": \"!\",\n    \"asterisk\": \"*\",\n    \"hash sign\": \"#\",\n    \"number sign\": \"#\",\n    \"percent sign\": \"%\",\n    \"at sign\": \"@\",\n    \"and sign\": \"&\",\n    \"ampersand\": \"&\",\n\n    # Currencies\n    \"dollar sign\": \"$\",\n    \"pound sign\": \"\u00a3\",\n}\nsymbol_key_words = {\n    \"dot\": \".\",\n    \"point\": \".\",\n    \"quote\": \"'\",\n    \"apostrophe\": \"'\",\n    \"L square\": \"[\",\n    \"left square\": \"[\",\n    \"square\": \"[\",\n    \"R square\": \"]\",\n    \"right square\": \"]\",\n    \"slash\": \"/\",\n    \"backslash\": \"\\\\\",\n    \"minus\": \"-\",\n    \"dash\": \"-\",\n    \"equals\": \"=\",\n    \"plus\": \"+\",\n    \"tilde\": \"~\",\n    \"bang\": \"!\",\n    \"down score\": \"_\",\n    \"under score\": \"_\",\n    \"paren\": \"(\",\n    \"L paren\": \"(\",\n    \"left paren\": \"(\",\n    \"R paren\": \")\",\n    \"right paren\": \")\",\n    \"brace\": \"{\",\n    \"left brace\": \"{\",\n    \"R brace\": \"}\",\n    \"right brace\": \"}\",\n    \"angle\": \"<\",\n    \"left angle\": \"<\",\n    \"less than\": \"<\",\n    \"rangle\": \">\",\n    \"R angle\": \">\",\n    \"right angle\": \">\",\n    \"greater than\": \">\",\n    \"star\": \"*\",\n    \"hash\": \"#\",\n    \"percent\": \"%\",\n    \"caret\": \"^\",\n    \"amper\": \"&\",\n    \"pipe\": \"|\",\n    \"dubquote\": '\"',\n    \"double quote\": '\"',\n\n    # Currencies\n    \"dollar\": \"$\",\n    \"pound\": \"\u00a3\",\n}\n\n# make punctuation words also included in {user.symbol_keys}\nsymbol_key_words.update(punctuation_words)\nctx.lists[\"self.punctuation\"] = punctuation_words\nctx.lists[\"self.symbol_key\"] = symbol_key_words\nctx.lists[\"self.number_key\"] = dict(zip(default_digits, numbers))\nctx.lists[\"self.arrow_key\"] = {\n    \"down\": \"down\",\n    \"left\": \"left\",\n    \"right\": \"right\",\n    \"up\": \"up\",\n}\n\nsimple_keys = [\n    \"end\",\n    \"enter\",\n    \"escape\",\n    \"home\",\n    \"insert\",\n    \"pagedown\",\n    \"pageup\",\n    \"space\",\n    \"tab\",\n]\n\nalternate_keys = {\n    \"delete\": \"backspace\",\n    \"forward delete\": \"delete\",\n    #'junk': 'backspace',\n    \"page up\": \"pageup\",\n    \"page down\": \"pagedown\",\n}\n# mac apparently doesn't have the menu key.\nif app.platform in (\"windows\", \"linux\"):\n    alternate_keys[\"menu key\"] = \"menu\"\n    alternate_keys[\"print screen\"] = \"printscr\"\n\nspecial_keys = {k: k for k in simple_keys}\nspecial_keys.update(alternate_keys)\nctx.lists[\"self.special_key\"] = special_keys\nctx.lists[\"self.function_key\"] = {\n    f\"F {default_f_digits[i]}\": f\"f{i + 1}\" for i in range(12)\n}\n\n\n", "path": "code/keys.py"}], "after_files": [{"content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n    \" \"\n)\nletters_string = \"abcdefghijklmnopqrstuvwxyz\"\n\ndefault_digits = \"zero one two three four five six seven eight nine\".split(\" \")\nnumbers = [str(i) for i in range(10)]\ndefault_f_digits = \"one two three four five six seven eight nine ten eleven twelve\".split(\n    \" \"\n)\n\nmod = Module()\nmod.list(\"letter\", desc=\"The spoken phonetic alphabet\")\nmod.list(\"symbol_key\", desc=\"All symbols from the keyboard\")\nmod.list(\"arrow_key\", desc=\"All arrow keys\")\nmod.list(\"number_key\", desc=\"All number keys\")\nmod.list(\"modifier_key\", desc=\"All modifier keys\")\nmod.list(\"function_key\", desc=\"All function keys\")\nmod.list(\"special_key\", desc=\"All special keys\")\nmod.list(\"punctuation\", desc=\"words for inserting punctuation into text\")\n\n\n@mod.capture(rule=\"{self.modifier_key}+\")\ndef modifiers(m) -> str:\n    \"One or more modifier keys\"\n    return \"-\".join(m.modifier_key_list)\n\n\n@mod.capture(rule=\"{self.arrow_key}\")\ndef arrow_key(m) -> str:\n    \"One directional arrow key\"\n    return m.arrow_key\n\n\n@mod.capture(rule=\"<self.arrow_key>+\")\ndef arrow_keys(m) -> str:\n    \"One or more arrow keys separated by a space\"\n    return str(m)\n\n\n@mod.capture(rule=\"{self.number_key}\")\ndef number_key(m) -> str:\n    \"One number key\"\n    return m.number_key\n\n\n@mod.capture(rule=\"{self.letter}\")\ndef letter(m) -> str:\n    \"One letter key\"\n    return m.letter\n\n\n@mod.capture(rule=\"{self.special_key}\")\ndef special_key(m) -> str:\n    \"One special key\"\n    return m.special_key\n\n\n@mod.capture(rule=\"{self.symbol_key}\")\ndef symbol_key(m) -> str:\n    \"One symbol key\"\n    return m.symbol_key\n\n\n@mod.capture(rule=\"{self.function_key}\")\ndef function_key(m) -> str:\n    \"One function key\"\n    return m.function_key\n\n\n@mod.capture(rule=\"( <self.letter> | <self.number_key> | <self.symbol_key> )\")\ndef any_alphanumeric_key(m) -> str:\n    \"any alphanumeric key\"\n    return str(m)\n\n\n@mod.capture(\n    rule=\"( <self.letter> | <self.number_key> | <self.symbol_key> \"\n    \"| <self.arrow_key> | <self.function_key> | <self.special_key> )\"\n)\ndef unmodified_key(m) -> str:\n    \"A single key with no modifiers\"\n    return str(m)\n\n\n@mod.capture(rule=\"{self.modifier_key}* <self.unmodified_key>\")\ndef key(m) -> str:\n    \"A single key with optional modifiers\"\n    try:\n        mods = m.modifier_key_list\n    except AttributeError:\n        mods = []\n    return \"-\".join(mods + [m.unmodified_key])\n\n\n@mod.capture(rule=\"<self.key>+\")\ndef keys(m) -> str:\n    \"A sequence of one or more keys with optional modifiers\"\n    return \" \".join(m.key_list)\n\n\n@mod.capture(rule=\"{self.letter}+\")\ndef letters(m) -> str:\n    \"Multiple letter keys\"\n    return \"\".join(m.letter_list)\n\n\nctx = Context()\nmodifier_keys = {\n    # If you find 'alt' is often misrecognized, try using 'alter'.\n    \"alt\": \"alt\",  #'alter': 'alt',\n    \"control\": \"ctrl\",  #'troll':   'ctrl',\n    \"shift\": \"shift\",  #'sky':     'shift',\n    \"super\": \"super\",\n}\nif app.platform  == \"mac\":\n    modifier_keys[\"command\"] = \"cmd\"\n    modifier_keys[\"option\"] = \"alt\"\nctx.lists[\"self.modifier_key\"] = modifier_keys\nalphabet = dict(zip(default_alphabet, letters_string))\nctx.lists[\"self.letter\"] = alphabet\n\n# `punctuation_words` is for words you want available BOTH in dictation and as key names in command mode.\n# `symbol_key_words` is for key names that should be available in command mode, but NOT during dictation.\npunctuation_words = {\n    # TODO: I'm not sure why we need these, I think it has something to do with\n    # Dragon. Possibly it has been fixed by later improvements to talon? -rntz\n    \"`\": \"`\",\n    \",\": \",\",  # <== these things\n    \"back tick\": \"`\",\n    \"grave\": \"`\",\n    \"comma\": \",\",\n    \"period\": \".\",\n    \"full stop\": \".\",\n    \"semicolon\": \";\",\n    \"colon\": \":\",\n    \"forward slash\": \"/\",\n    \"question mark\": \"?\",\n    \"exclamation mark\": \"!\",\n    \"exclamation point\": \"!\",\n    \"asterisk\": \"*\",\n    \"hash sign\": \"#\",\n    \"number sign\": \"#\",\n    \"percent sign\": \"%\",\n    \"at sign\": \"@\",\n    \"and sign\": \"&\",\n    \"ampersand\": \"&\",\n\n    # Currencies\n    \"dollar sign\": \"$\",\n    \"pound sign\": \"\u00a3\",\n}\nsymbol_key_words = {\n    \"dot\": \".\",\n    \"point\": \".\",\n    \"quote\": \"'\",\n    \"apostrophe\": \"'\",\n    \"L square\": \"[\",\n    \"left square\": \"[\",\n    \"square\": \"[\",\n    \"R square\": \"]\",\n    \"right square\": \"]\",\n    \"slash\": \"/\",\n    \"backslash\": \"\\\\\",\n    \"minus\": \"-\",\n    \"dash\": \"-\",\n    \"equals\": \"=\",\n    \"plus\": \"+\",\n    \"tilde\": \"~\",\n    \"bang\": \"!\",\n    \"down score\": \"_\",\n    \"under score\": \"_\",\n    \"paren\": \"(\",\n    \"L paren\": \"(\",\n    \"left paren\": \"(\",\n    \"R paren\": \")\",\n    \"right paren\": \")\",\n    \"brace\": \"{\",\n    \"left brace\": \"{\",\n    \"R brace\": \"}\",\n    \"right brace\": \"}\",\n    \"angle\": \"<\",\n    \"left angle\": \"<\",\n    \"less than\": \"<\",\n    \"rangle\": \">\",\n    \"R angle\": \">\",\n    \"right angle\": \">\",\n    \"greater than\": \">\",\n    \"star\": \"*\",\n    \"hash\": \"#\",\n    \"percent\": \"%\",\n    \"caret\": \"^\",\n    \"amper\": \"&\",\n    \"pipe\": \"|\",\n    \"dubquote\": '\"',\n    \"double quote\": '\"',\n\n    # Currencies\n    \"dollar\": \"$\",\n    \"pound\": \"\u00a3\",\n}\n\n# make punctuation words also included in {user.symbol_keys}\nsymbol_key_words.update(punctuation_words)\nctx.lists[\"self.punctuation\"] = punctuation_words\nctx.lists[\"self.symbol_key\"] = symbol_key_words\nctx.lists[\"self.number_key\"] = dict(zip(default_digits, numbers))\nctx.lists[\"self.arrow_key\"] = {\n    \"down\": \"down\",\n    \"left\": \"left\",\n    \"right\": \"right\",\n    \"up\": \"up\",\n}\n\nsimple_keys = [\n    \"end\",\n    \"enter\",\n    \"escape\",\n    \"home\",\n    \"insert\",\n    \"pagedown\",\n    \"pageup\",\n    \"space\",\n    \"tab\",\n]\n\nalternate_keys = {\n    \"delete\": \"backspace\",\n    \"forward delete\": \"delete\",\n    #'junk': 'backspace',\n    \"page up\": \"pageup\",\n    \"page down\": \"pagedown\",\n}\n# mac apparently doesn't have the menu key.\nif app.platform in (\"windows\", \"linux\"):\n    alternate_keys[\"menu key\"] = \"menu\"\n    alternate_keys[\"print screen\"] = \"printscr\"\n\nspecial_keys = {k: k for k in simple_keys}\nspecial_keys.update(alternate_keys)\nctx.lists[\"self.special_key\"] = special_keys\nctx.lists[\"self.function_key\"] = {\n    f\"F {default_f_digits[i]}\": f\"f{i + 1}\" for i in range(12)\n}\n\n\n@mod.action_class\nclass Actions:\n    def move_cursor(s: str):\n        \"\"\"Given a sequence of directions, eg. 'left left up', moves the cursor accordingly using edit.{left,right,up,down}.\"\"\"\n        for d in s.split():\n            if d in ('left','right','up','down'):\n                getattr(actions.edit, d)()\n            else:\n                raise RuntimeError(f'invalid arrow key: {d}')\n", "path": "code/keys.py"}]}