shortcuts.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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: [getPlatformAlternateKey(), "R"],
  139. label: "shortcut.navigation.rest",
  140. action: "navigation.jump.rest",
  141. icon: "arrow-right",
  142. },
  143. {
  144. keys: [getPlatformAlternateKey(), "Q"],
  145. label: "shortcut.navigation.graphql",
  146. action: "navigation.jump.graphql",
  147. icon: "arrow-right",
  148. },
  149. {
  150. keys: [getPlatformAlternateKey(), "W"],
  151. label: "shortcut.navigation.realtime",
  152. action: "navigation.jump.realtime",
  153. icon: "arrow-right",
  154. },
  155. {
  156. keys: [getPlatformAlternateKey(), "D"],
  157. label: "shortcut.navigation.documentation",
  158. action: "navigation.jump.documentation",
  159. icon: "arrow-right",
  160. },
  161. {
  162. keys: [getPlatformAlternateKey(), "S"],
  163. label: "shortcut.navigation.settings",
  164. action: "navigation.jump.settings",
  165. icon: "arrow-right",
  166. },
  167. ],
  168. },
  169. {
  170. section: "shortcut.miscellaneous.title",
  171. shortcuts: [
  172. {
  173. keys: [getPlatformSpecialKey(), "M"],
  174. label: "shortcut.miscellaneous.invite",
  175. action: "modals.share.toggle",
  176. icon: "gift",
  177. },
  178. ],
  179. },
  180. ]
  181. export const fuse = [
  182. {
  183. keys: ["?"],
  184. label: "shortcut.general.help_menu",
  185. action: "modals.support.toggle",
  186. icon: "life-buoy",
  187. tags: [
  188. "help",
  189. "support",
  190. "menu",
  191. "discord",
  192. "twitter",
  193. "documentation",
  194. "troubleshooting",
  195. "chat",
  196. "community",
  197. "feedback",
  198. "report",
  199. "bug",
  200. "issue",
  201. "ticket",
  202. ],
  203. },
  204. {
  205. keys: [getPlatformSpecialKey(), "K"],
  206. label: "shortcut.general.show_all",
  207. action: "flyouts.keybinds.toggle",
  208. icon: "zap",
  209. tags: ["keyboard", "shortcuts"],
  210. },
  211. {
  212. keys: [getPlatformAlternateKey(), "R"],
  213. label: "shortcut.navigation.rest",
  214. action: "navigation.jump.rest",
  215. icon: "arrow-right",
  216. tags: ["rest", "jump", "page", "navigation", "go"],
  217. },
  218. {
  219. keys: [getPlatformAlternateKey(), "Q"],
  220. label: "shortcut.navigation.graphql",
  221. action: "navigation.jump.graphql",
  222. icon: "arrow-right",
  223. tags: ["graphql", "jump", "page", "navigation", "go"],
  224. },
  225. {
  226. keys: [getPlatformAlternateKey(), "W"],
  227. label: "shortcut.navigation.realtime",
  228. action: "navigation.jump.realtime",
  229. icon: "arrow-right",
  230. tags: [
  231. "realtime",
  232. "jump",
  233. "page",
  234. "navigation",
  235. "websocket",
  236. "socket",
  237. "mqtt",
  238. "sse",
  239. "go",
  240. ],
  241. },
  242. {
  243. keys: [getPlatformAlternateKey(), "D"],
  244. label: "shortcut.navigation.documentation",
  245. action: "navigation.jump.documentation",
  246. icon: "arrow-right",
  247. tags: ["documentation", "jump", "page", "navigation", "go"],
  248. },
  249. {
  250. keys: [getPlatformAlternateKey(), "S"],
  251. label: "shortcut.navigation.settings",
  252. action: "navigation.jump.settings",
  253. icon: "arrow-right",
  254. tags: ["settings", "jump", "page", "navigation", "account", "theme", "go"],
  255. },
  256. {
  257. keys: [getPlatformSpecialKey(), "M"],
  258. label: "shortcut.miscellaneous.invite",
  259. action: "modals.share.toggle",
  260. icon: "gift",
  261. tags: ["invite", "share", "app", "friends", "people", "social"],
  262. },
  263. ]