How to use angular2-hotkeys - 10 common examples

To help you get started, we’ve selected a few angular2-hotkeys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse / winery / org.eclipse.winery.frontends / app / topologymodeler / src / app / winery.module.ts View on Github external
RouterModule.forRoot([{ path: '**', redirectTo: '', pathMatch: 'full' }]),
        BrowserAnimationsModule,
        NgReduxModule,
        BsDropdownModule.forRoot(),
        ToastrModule.forRoot({
            timeOut: 3000,
            preventDuplicates: true,
            easing: 'ease-in-out',
            enableHtml: true,
            progressBar: true,
            extendedTimeOut: 3000,
            easeTime: 450
        }),
        AccordionModule.forRoot(),
        TopologyRendererModule.forRoot(),
        HotkeyModule.forRoot({ cheatSheetHotkey: 'mod+space' }),
        WineryModalModule,
        TypeaheadModule.forRoot(),
        PopoverModule.forRoot(),
        PropertiesModule,
        WineryFeatureToggleModule
    ],
    providers: [
        // { provide: ToastOptions, useClass: WineryCustomOption },
        JsPlumbService,
        WineryActions,
        TopologyRendererActions,
        LoadedService,
        AppReadyEventService,
        BackendService,
        ExistsService,
        EntitiesModalService,
github alyvix / alyvix / alyvix-ui / src / app / ax-designer / designer.module.ts View on Github external
RComponent,
    TComponent,
    InteractionComponent,
    BoxOptionsComponent,
    TreeNodeComponent,
    SelectTypeComponent,
    ScreenComponent,
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    FormsModule,
    DragDropModule,
    AngularResizedEventModule,
    ContextMenuModule.forRoot(),
    HotkeyModule.forRoot({cheatSheetHotkey: "ctrl+h"}),
    CustomFormsModule,
    ReactiveFormsModule,
    AutocompleteLibModule,
    BrowserAnimationsModule, // required animations module
    ToastrModule.forRoot()
  ],
  providers: [
    {provide: 'GlobalRefDesigner', useClass: environment.globalTypeDesigner},
    {provide: 'subSystem', useValue: 'designer'}
  ],
  bootstrap: [DesignerComponent]
})
export class DesignerModule { }
github cormacrelf / angular-skyhook / packages / examples / src / app / app.module.ts View on Github external
declarations: [AppComponent, TestComponent],
    imports: [
        BrowserModule,
        UtilityModule,
        RouterModule.forRoot(routes, {
            preloadingStrategy: PreloadAllModules,
            useHash: true
        }),
        StoreRootModule,
        SkyhookDndModule.forRoot({ backendFactory: customMultiBackend }),
        // SkyhookDndModule.forRoot({ backend: TouchBackend }),
        // SkyhookDndModule.forRoot({ backend: MouseBackend }),
        StoreModule.forRoot(reducers, { metaReducers }),
        // !environment.production ? StoreDevtoolsModule.instrument() : [],
        EffectsModule.forRoot([AppEffects]),
        HotkeyModule.forRoot()
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}
github Gisto / Gisto / src / app / app.module.ts View on Github external
GistoCodeEditorComponent
  ],
  imports: [
    RouterModule.forRoot(
      appRoutes,
        { enableTracing: false } // <-- debugging purposes only
    ),
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,

    MobxAngularModule,
    // CovalentCodeEditorModule,
    AceEditorModule,
    MarkdownModule.forRoot(),
    HotkeyModule.forRoot(),
    NgxElectronModule
  ],
  providers: [
    SettingsStore,
    NotificationsStore,
    GithubAuthorizationService,
    AuthGuard
  ],
  bootstrap: [AppComponent],
  schemas: [ NO_ERRORS_SCHEMA ]
})
export class AppModule { }
github exceptionless / Exceptionless.UI / src / app / components / layout / event / event.component.ts View on Github external
private addHotKeys() {
        if (this.event.stack_id) {
            this.hotkeysService.add(new Hotkey("mod+up", (event: KeyboardEvent): boolean => {
                $ExceptionlessClient.createFeatureUsage(`${this._source}.hotkeys.GoToStack`)
                    .addTags("hotkeys")
                    .setProperty("id", this.eventId)
                    .submit();
                this.router.navigate([`/type/event/${this.eventId}`]);
                return false;
            }));

            if (this.clipboardService.isSupported) {
                this.hotkeysService.add(new Hotkey("mod+shift+c", (event: KeyboardEvent): boolean => {
                    $ExceptionlessClient.createFeatureUsage(`${this._source}.hotkeys.CopyEventJSON`)
                        .addTags("hotkeys")
                        .setProperty("id", this.eventId)
                        .submit();
                    this.clipboardService.copyFromContent(this.eventJson);
                    return false;
                }));
            }
        }

        if (this.previous) {
            this.hotkeysService.add(new Hotkey("mod+left", (event: KeyboardEvent): boolean => {
                $ExceptionlessClient.createFeatureUsage(`${this._source}.hotkeys.PreviousOccurrence`)
                    .addTags("hotkeys")
                    .setProperty("id", this.eventId)
                    .submit();
github search-future / miyou.tv / miyoutv / src / app / programs / program-play.component.ts View on Github external
},
      [],
      '音量を下げる',
    ), new Hotkey(
      ['left', 'mod+left'],
      (): boolean => {
        if (document.elementFromPoint(0, 0).className !== 'cfp-hotkeys') {
          this.player.jumpBackward('11s');
          return false;
        }
        return true;
      },
      [],
      '10秒戻す',
    ), new Hotkey(
      ['right', 'mod+right'],
      (): boolean => {
        if (document.elementFromPoint(0, 0).className !== 'cfp-hotkeys') {
          this.player.jumpForward('29s');
          return false;
        }
        return true;
      },
      [],
      '30秒進める',
    ), new Hotkey(
      ['shift+left', '['],
      (): boolean => {
        if (document.elementFromPoint(0, 0).className !== 'cfp-hotkeys') {
          this.commentPlayer.delay -= 500;
          return false;
github Gisto / Gisto / src / app / app.component.ts View on Github external
constructor(private hotkeysService: HotkeysService, public uiStore: UiStore) {
    this.hotkeyShiftSpace = hotkeysService.add(
      new Hotkey('shift+space', this.hotkeyShiftSpacePressed, ['INPUT', 'TEXTAREA'], 'Super search')
    );
  }
github omenyayl / dataset-annotator / src / pages / items / items.ts View on Github external
updateHotkeys(hotkeys) {
        if(this.hotkeys !== undefined) {
            this.hotkeyService.add(new Hotkey(this.hotkeys.nextImage, (): boolean =>{ return false }));
            this.hotkeyService.add(new Hotkey(this.hotkeys.prevImage, (): boolean =>{ return false }));
        }

        this.hotkeys = hotkeys;
        this.hotkeyService.add(new Hotkey(this.hotkeys.nextImage,
            (): boolean => {
                this.nextItem();
                return false;
            }));
        this.hotkeyService.add(new Hotkey(this.hotkeys.prevImage,
            (): boolean => {
                this.previousItem();
                return false;
            }));
    }
}
github search-future / miyou.tv / miyoutv / src / app / programs / program-play.component.ts View on Github external
return true;
      },
      [],
      'コメントを早める',
    ), new Hotkey(
      ['shift+right', ']'],
      (): boolean => {
        if (document.elementFromPoint(0, 0).className !== 'cfp-hotkeys') {
          this.commentPlayer.delay += 500;
          return false;
        }
        return true;
      },
      [],
      'コメントを遅らせる',
    ), new Hotkey(
      ['o', 'mod+s'],
      (): boolean => {
        if (document.elementFromPoint(0, 0).className !== 'cfp-hotkeys') {
          this.sidebarCollapsed = !this.sidebarCollapsed;
          return false;
        }
        return true;
      },
      [],
      'サイドバーを表示/非表示',
    )]);
  }
github exceptionless / Exceptionless.UI / src / app / app.component.ts View on Github external
this.hotkeysService.add(new Hotkey("g a", (event: KeyboardEvent): boolean => {
            this.router.navigate(["/account/manage"], { queryParams: { tab: "general" } });
            return false;
        }, null, "Go To My Account"));

        this.hotkeysService.add(new Hotkey("g n", (event: KeyboardEvent): boolean => {
            this.router.navigate(["/account/manage"], { queryParams: { tab: "notifications" } });
            return false;
        }, null, "Go To Notifications"));

        this.hotkeysService.add(new Hotkey("g d", (event: KeyboardEvent): boolean => {
            this.router.navigate(["/dashboard"]);
            return false;
        }, null, "Go To Dashboard"));

        this.hotkeysService.add(new Hotkey("g o", (event: KeyboardEvent): boolean => {
            this.router.navigate(["/organization/list"]);
            return false;
        }, null, "Go To Organizations"));

        this.hotkeysService.add(new Hotkey("g p", (event: KeyboardEvent): boolean => {
            this.router.navigate(["/project/list"]);
            return false;
        }, null, "Go To Projects"));

        this.hotkeysService.add(new Hotkey("g g", (event: KeyboardEvent): boolean => {
            window.open("https://github.com/exceptionless/Exceptionless", "_blank");
            return false;
        }, null, "Go To GitHub project"));

        this.hotkeysService.add(new Hotkey("g s", (event: KeyboardEvent): boolean => {
            window.open("http://slack.exceptionless.com", "_blank");

angular2-hotkeys

Angular 16 and Ivy Compatible. Older versions might work but isn't officially tested.

MIT
Latest version published 11 months ago

Package Health Score

67 / 100
Full package analysis