shortcuts.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. import { getPlatformAlternateKey, getPlatformSpecialKey } from "./platformutils"
  2. export default [
  3. {
  4. section: "shortcut.general.title",
  5. shortcuts: [
  6. {
  7. keys: ["?"],
  8. label: "shortcut.general.help_menu",
  9. },
  10. {
  11. keys: ["/"],
  12. label: "shortcut.general.command_menu",
  13. },
  14. {
  15. keys: [getPlatformSpecialKey(), "K"],
  16. label: "shortcut.general.show_all",
  17. },
  18. {
  19. keys: ["Esc"],
  20. label: "shortcut.general.close_current_menu",
  21. },
  22. ],
  23. },
  24. {
  25. section: "shortcut.request.title",
  26. shortcuts: [
  27. {
  28. keys: [getPlatformSpecialKey(), "G"],
  29. label: "shortcut.request.send_request",
  30. },
  31. {
  32. keys: [getPlatformSpecialKey(), "S"],
  33. label: "shortcut.request.save_to_collections",
  34. },
  35. {
  36. keys: [getPlatformSpecialKey(), "U"],
  37. label: "shortcut.request.copy_request_link",
  38. },
  39. {
  40. keys: [getPlatformSpecialKey(), "I"],
  41. label: "shortcut.request.reset_request",
  42. },
  43. {
  44. keys: [getPlatformAlternateKey(), "↑"],
  45. label: "shortcut.request.next_method",
  46. },
  47. {
  48. keys: [getPlatformAlternateKey(), "↓"],
  49. label: "shortcut.request.previous_method",
  50. },
  51. {
  52. keys: [getPlatformAlternateKey(), "G"],
  53. label: "shortcut.request.get_method",
  54. },
  55. {
  56. keys: [getPlatformAlternateKey(), "H"],
  57. label: "shortcut.request.head_method",
  58. },
  59. {
  60. keys: [getPlatformAlternateKey(), "P"],
  61. label: "shortcut.request.post_method",
  62. },
  63. {
  64. keys: [getPlatformAlternateKey(), "U"],
  65. label: "shortcut.request.put_method",
  66. },
  67. {
  68. keys: [getPlatformAlternateKey(), "X"],
  69. label: "shortcut.request.delete_method",
  70. },
  71. ],
  72. },
  73. {
  74. section: "shortcut.navigation.title",
  75. shortcuts: [
  76. {
  77. keys: [getPlatformSpecialKey(), "←"],
  78. label: "shortcut.navigation.back",
  79. },
  80. {
  81. keys: [getPlatformSpecialKey(), "→"],
  82. label: "shortcut.navigation.forward",
  83. },
  84. {
  85. keys: [getPlatformAlternateKey(), "R"],
  86. label: "shortcut.navigation.rest",
  87. },
  88. {
  89. keys: [getPlatformAlternateKey(), "Q"],
  90. label: "shortcut.navigation.graphql",
  91. },
  92. {
  93. keys: [getPlatformAlternateKey(), "W"],
  94. label: "shortcut.navigation.realtime",
  95. },
  96. {
  97. keys: [getPlatformAlternateKey(), "D"],
  98. label: "shortcut.navigation.documentation",
  99. },
  100. {
  101. keys: [getPlatformAlternateKey(), "S"],
  102. label: "shortcut.navigation.settings",
  103. },
  104. ],
  105. },
  106. {
  107. section: "shortcut.miscellaneous.title",
  108. shortcuts: [
  109. {
  110. keys: [getPlatformSpecialKey(), "M"],
  111. label: "shortcut.miscellaneous.invite",
  112. },
  113. ],
  114. },
  115. ]
  116. export const spotlight = [
  117. {
  118. section: "app.spotlight",
  119. shortcuts: [
  120. {
  121. keys: ["?"],
  122. label: "shortcut.general.help_menu",
  123. action: "modals.support.toggle",
  124. icon: "life-buoy",
  125. },
  126. {
  127. keys: [getPlatformSpecialKey(), "K"],
  128. label: "shortcut.general.show_all",
  129. action: "flyouts.keybinds.toggle",
  130. icon: "zap",
  131. },
  132. ],
  133. },
  134. {
  135. section: "shortcut.navigation.title",
  136. shortcuts: [
  137. {
  138. keys: [getPlatformSpecialKey(), "←"],
  139. label: "shortcut.navigation.back",
  140. action: "navigation.jump.back",
  141. icon: "arrow-right",
  142. },
  143. {
  144. keys: [getPlatformSpecialKey(), "→"],
  145. label: "shortcut.navigation.forward",
  146. action: "navigation.jump.forward",
  147. icon: "arrow-right",
  148. },
  149. {
  150. keys: [getPlatformAlternateKey(), "R"],
  151. label: "shortcut.navigation.rest",
  152. action: "navigation.jump.rest",
  153. icon: "arrow-right",
  154. },
  155. {
  156. keys: [getPlatformAlternateKey(), "Q"],
  157. label: "shortcut.navigation.graphql",
  158. action: "navigation.jump.graphql",
  159. icon: "arrow-right",
  160. },
  161. {
  162. keys: [getPlatformAlternateKey(), "W"],
  163. label: "shortcut.navigation.realtime",
  164. action: "navigation.jump.realtime",
  165. icon: "arrow-right",
  166. },
  167. {
  168. keys: [getPlatformAlternateKey(), "D"],
  169. label: "shortcut.navigation.documentation",
  170. action: "navigation.jump.documentation",
  171. icon: "arrow-right",
  172. },
  173. {
  174. keys: [getPlatformAlternateKey(), "S"],
  175. label: "shortcut.navigation.settings",
  176. action: "navigation.jump.settings",
  177. icon: "arrow-right",
  178. },
  179. ],
  180. },
  181. {
  182. section: "shortcut.miscellaneous.title",
  183. shortcuts: [
  184. {
  185. keys: [getPlatformSpecialKey(), "M"],
  186. label: "shortcut.miscellaneous.invite",
  187. action: "modals.share.toggle",
  188. icon: "gift",
  189. },
  190. ],
  191. },
  192. ]
  193. export const fuse = [
  194. {
  195. keys: ["?"],
  196. label: "shortcut.general.help_menu",
  197. action: "modals.support.toggle",
  198. icon: "life-buoy",
  199. tags: [
  200. "help",
  201. "support",
  202. "menu",
  203. "discord",
  204. "twitter",
  205. "documentation",
  206. "troubleshooting",
  207. "chat",
  208. "community",
  209. "feedback",
  210. "report",
  211. "bug",
  212. "issue",
  213. "ticket",
  214. ],
  215. },
  216. {
  217. keys: [getPlatformSpecialKey(), "K"],
  218. label: "shortcut.general.show_all",
  219. action: "flyouts.keybinds.toggle",
  220. icon: "zap",
  221. tags: ["keyboard", "shortcuts"],
  222. },
  223. {
  224. keys: [getPlatformSpecialKey(), "←"],
  225. label: "shortcut.navigation.back",
  226. action: "navigation.jump.back",
  227. icon: "arrow-right",
  228. tags: ["back", "jump", "page", "navigation", "go"],
  229. },
  230. {
  231. keys: [getPlatformSpecialKey(), "→"],
  232. label: "shortcut.navigation.forward",
  233. action: "navigation.jump.forward",
  234. icon: "arrow-right",
  235. tags: ["forward", "jump", "next", "forward", "page", "navigation", "go"],
  236. },
  237. {
  238. keys: [getPlatformAlternateKey(), "R"],
  239. label: "shortcut.navigation.rest",
  240. action: "navigation.jump.rest",
  241. icon: "arrow-right",
  242. tags: ["rest", "jump", "page", "navigation", "go"],
  243. },
  244. {
  245. keys: [getPlatformAlternateKey(), "Q"],
  246. label: "shortcut.navigation.graphql",
  247. action: "navigation.jump.graphql",
  248. icon: "arrow-right",
  249. tags: ["graphql", "jump", "page", "navigation", "go"],
  250. },
  251. {
  252. keys: [getPlatformAlternateKey(), "W"],
  253. label: "shortcut.navigation.realtime",
  254. action: "navigation.jump.realtime",
  255. icon: "arrow-right",
  256. tags: [
  257. "realtime",
  258. "jump",
  259. "page",
  260. "navigation",
  261. "websocket",
  262. "socket",
  263. "mqtt",
  264. "sse",
  265. "go",
  266. ],
  267. },
  268. {
  269. keys: [getPlatformAlternateKey(), "D"],
  270. label: "shortcut.navigation.documentation",
  271. action: "navigation.jump.documentation",
  272. icon: "arrow-right",
  273. tags: ["documentation", "jump", "page", "navigation", "go"],
  274. },
  275. {
  276. keys: [getPlatformAlternateKey(), "S"],
  277. label: "shortcut.navigation.settings",
  278. action: "navigation.jump.settings",
  279. icon: "arrow-right",
  280. tags: ["settings", "jump", "page", "navigation", "account", "theme", "go"],
  281. },
  282. {
  283. keys: [getPlatformSpecialKey(), "M"],
  284. label: "shortcut.miscellaneous.invite",
  285. action: "modals.share.toggle",
  286. icon: "gift",
  287. tags: ["invite", "share", "app", "friends", "people", "social"],
  288. },
  289. ]