shortcuts.component.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import { Component } from '@angular/core';
  2. @Component({
  3. selector: 'evt-shortcuts',
  4. templateUrl: './shortcuts.component.html',
  5. styleUrls: ['./shortcuts.component.scss'],
  6. })
  7. export class ShortcutsComponent {
  8. // tslint:disable-next-line: no-any
  9. public shortcuts: Array<{ label: string, instructions: any[] }> = []; // TODO: get rid of instructions
  10. constructor() {
  11. this.initShortcuts();
  12. }
  13. private initShortcuts() {
  14. this.shortcuts.push({
  15. label: 'OpenProjectInfo',
  16. instructions: [
  17. { type: 'key', text: 'ALT' },
  18. { text: '+' },
  19. { type: 'key', text: 'I' }],
  20. });
  21. this.shortcuts.push({
  22. label: 'OpenLists',
  23. instructions: [
  24. { type: 'key', text: 'ALT' },
  25. { text: '+' },
  26. { type: 'key', text: 'L' }],
  27. });
  28. this.shortcuts.push({
  29. label: 'OpenCurrentBookmark',
  30. instructions: [
  31. { type: 'key', text: 'ALT' },
  32. { text: '+' },
  33. { type: 'key', text: 'B' }],
  34. });
  35. this.shortcuts.push({
  36. label: 'OpenEVTInfo',
  37. instructions: [
  38. { type: 'key', text: 'ALT' },
  39. { text: '+' },
  40. { type: 'key', text: 'SHIFT' },
  41. { text: '+' },
  42. { type: 'key', text: 'E' }],
  43. });
  44. this.shortcuts.push({
  45. label: 'OpenShortcuts',
  46. instructions: [
  47. { type: 'key', text: 'ALT' },
  48. { text: '+' },
  49. { type: 'key', text: 'SHIFT' },
  50. { text: '+' },
  51. { type: 'key', text: 'S' }],
  52. });
  53. // this.shortcuts.push({
  54. // label: 'ChangeView',
  55. // instructions: [
  56. // { type: 'key', text: 'ALT' },
  57. // { text: '+' },
  58. // { type: 'key', text: '1' },
  59. // { text: '/' },
  60. // { type: 'key', text: 'ALT' },
  61. // { text: '+' },
  62. // { type: 'key', text: '2' },
  63. // { text: '/' },
  64. // { type: 'key', text: 'ALT' },
  65. // { text: '+' },
  66. // { type: 'key', text: '3' },
  67. // { text: '...' }]
  68. // });
  69. // this.shortcuts.push({
  70. // label: 'ChangePage',
  71. // instructions: [
  72. // { type: 'key', text: '&larr;' },
  73. // { text: 'and' },
  74. // { type: 'key', text: '&rarr;' }]
  75. // });
  76. // this.shortcuts.push({
  77. // label: 'ChangeDocument',
  78. // instructions: [
  79. // { type: 'key', text: '&uarr;' },
  80. // { text: 'and' },
  81. // { type: 'key', text: '&darr;' }]
  82. // });
  83. // this.shortcuts.push({
  84. // label: 'FullScreen',
  85. // instructions: [
  86. // { type: 'key', text: 'ctrl' },
  87. // { text: '/' },
  88. // { type: 'key', text: 'cmd' },
  89. // { text: '+' },
  90. // { type: 'key', text: 'alt' },
  91. // { text: '+' },
  92. // { type: 'key', text: 'shift' },
  93. // { text: '+' },
  94. // { type: 'key', text: 'f' }]
  95. // });
  96. // this.shortcuts.push({
  97. // label: 'FullScreen',
  98. // instructions: [
  99. // { type: 'key', text: 'ctrl' },
  100. // { text: '/' },
  101. // { type: 'key', text: 'cmd' },
  102. // { text: '+' },
  103. // { type: 'key', text: 'alt' },
  104. // { text: '+' },
  105. // { type: 'key', text: 'f' }]
  106. // });
  107. this.shortcuts.push({
  108. label: 'CloseModalIfOpened',
  109. instructions: [
  110. { type: 'key', text: 'ESC' }],
  111. });
  112. }
  113. }