shortcuts.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. keys: [getPlatformAlternateKey(), "P"],
  106. label: "shortcut.navigation.profile",
  107. },
  108. ],
  109. },
  110. {
  111. section: "shortcut.miscellaneous.title",
  112. shortcuts: [
  113. {
  114. keys: [getPlatformSpecialKey(), "M"],
  115. label: "shortcut.miscellaneous.invite",
  116. },
  117. ],
  118. },
  119. ]
  120. export const spotlight = [
  121. {
  122. section: "app.spotlight",
  123. shortcuts: [
  124. {
  125. keys: ["?"],
  126. label: "shortcut.general.help_menu",
  127. action: "modals.support.toggle",
  128. icon: "life-buoy",
  129. },
  130. {
  131. keys: [getPlatformSpecialKey(), "K"],
  132. label: "shortcut.general.show_all",
  133. action: "flyouts.keybinds.toggle",
  134. icon: "zap",
  135. },
  136. ],
  137. },
  138. {
  139. section: "shortcut.navigation.title",
  140. shortcuts: [
  141. {
  142. keys: [getPlatformAlternateKey(), "R"],
  143. label: "shortcut.navigation.rest",
  144. action: "navigation.jump.rest",
  145. icon: "arrow-right",
  146. },
  147. {
  148. keys: [getPlatformAlternateKey(), "Q"],
  149. label: "shortcut.navigation.graphql",
  150. action: "navigation.jump.graphql",
  151. icon: "arrow-right",
  152. },
  153. {
  154. keys: [getPlatformAlternateKey(), "W"],
  155. label: "shortcut.navigation.realtime",
  156. action: "navigation.jump.realtime",
  157. icon: "arrow-right",
  158. },
  159. {
  160. keys: [getPlatformAlternateKey(), "D"],
  161. label: "shortcut.navigation.documentation",
  162. action: "navigation.jump.documentation",
  163. icon: "arrow-right",
  164. },
  165. {
  166. keys: [getPlatformAlternateKey(), "S"],
  167. label: "shortcut.navigation.settings",
  168. action: "navigation.jump.settings",
  169. icon: "arrow-right",
  170. },
  171. {
  172. keys: [getPlatformAlternateKey(), "P"],
  173. label: "shortcut.navigation.profile",
  174. action: "navigation.jump.profile",
  175. icon: "arrow-right",
  176. },
  177. ],
  178. },
  179. {
  180. section: "shortcut.miscellaneous.title",
  181. shortcuts: [
  182. {
  183. keys: [getPlatformSpecialKey(), "M"],
  184. label: "shortcut.miscellaneous.invite",
  185. action: "modals.share.toggle",
  186. icon: "gift",
  187. },
  188. ],
  189. },
  190. ]
  191. export const fuse = [
  192. {
  193. keys: ["?"],
  194. label: "shortcut.general.help_menu",
  195. action: "modals.support.toggle",
  196. icon: "life-buoy",
  197. tags: [
  198. "help",
  199. "support",
  200. "menu",
  201. "discord",
  202. "twitter",
  203. "documentation",
  204. "troubleshooting",
  205. "chat",
  206. "community",
  207. "feedback",
  208. "report",
  209. "bug",
  210. "issue",
  211. "ticket",
  212. ],
  213. },
  214. {
  215. keys: [getPlatformSpecialKey(), "K"],
  216. label: "shortcut.general.show_all",
  217. action: "flyouts.keybinds.toggle",
  218. icon: "zap",
  219. tags: ["keyboard", "shortcuts"],
  220. },
  221. {
  222. keys: [getPlatformAlternateKey(), "R"],
  223. label: "shortcut.navigation.rest",
  224. action: "navigation.jump.rest",
  225. icon: "arrow-right",
  226. tags: ["rest", "jump", "page", "navigation", "go"],
  227. },
  228. {
  229. keys: [getPlatformAlternateKey(), "Q"],
  230. label: "shortcut.navigation.graphql",
  231. action: "navigation.jump.graphql",
  232. icon: "arrow-right",
  233. tags: ["graphql", "jump", "page", "navigation", "go"],
  234. },
  235. {
  236. keys: [getPlatformAlternateKey(), "W"],
  237. label: "shortcut.navigation.realtime",
  238. action: "navigation.jump.realtime",
  239. icon: "arrow-right",
  240. tags: [
  241. "realtime",
  242. "jump",
  243. "page",
  244. "navigation",
  245. "websocket",
  246. "socket",
  247. "mqtt",
  248. "sse",
  249. "go",
  250. ],
  251. },
  252. {
  253. keys: [getPlatformAlternateKey(), "D"],
  254. label: "shortcut.navigation.documentation",
  255. action: "navigation.jump.documentation",
  256. icon: "arrow-right",
  257. tags: ["documentation", "jump", "page", "navigation", "go"],
  258. },
  259. {
  260. keys: [getPlatformAlternateKey(), "S"],
  261. label: "shortcut.navigation.settings",
  262. action: "navigation.jump.settings",
  263. icon: "arrow-right",
  264. tags: ["settings", "jump", "page", "navigation", "account", "theme", "go"],
  265. },
  266. {
  267. keys: [getPlatformAlternateKey(), "P"],
  268. label: "shortcut.navigation.profile",
  269. action: "navigation.jump.profile",
  270. icon: "arrow-right",
  271. tags: ["profile", "jump", "page", "navigation", "account", "theme", "go"],
  272. },
  273. {
  274. keys: [getPlatformSpecialKey(), "M"],
  275. label: "shortcut.miscellaneous.invite",
  276. action: "modals.share.toggle",
  277. icon: "gift",
  278. tags: ["invite", "share", "app", "friends", "people", "social"],
  279. },
  280. {
  281. keys: [getPlatformAlternateKey(), "0"],
  282. label: "shortcut.theme.system",
  283. action: "settings.theme.system",
  284. icon: "monitor",
  285. tags: ["theme", "system"],
  286. },
  287. {
  288. keys: [getPlatformAlternateKey(), "1"],
  289. label: "shortcut.theme.light",
  290. action: "settings.theme.light",
  291. icon: "sun",
  292. tags: ["theme", "light"],
  293. },
  294. {
  295. keys: [getPlatformAlternateKey(), "2"],
  296. label: "shortcut.theme.dark",
  297. action: "settings.theme.dark",
  298. icon: "cloud",
  299. tags: ["theme", "dark"],
  300. },
  301. {
  302. keys: [getPlatformAlternateKey(), "3"],
  303. label: "shortcut.theme.black",
  304. action: "settings.theme.black",
  305. icon: "moon",
  306. tags: ["theme", "black"],
  307. },
  308. ]