Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
preventDefault: true,
command: e => console.log("clicked shift + n" , e.key)
},
{
key: "N",
label: "help",
description: "big N",
preventDefault: true,
command: e => console.log("clicked big N" , e.key)
},
{
key: "~",
label: "help",
description: "~ sign",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked ~ sign" , e.key)
},
{
key: "?",
label: "help",
description: "Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked question mark" , e.key)
},
{
key: "ctrl + ?",
label: "help",
description: "Shift + Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked big N" , e.key)
},
{
key: "~",
label: "help",
description: "~ sign",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked ~ sign" , e.key)
},
{
key: "?",
label: "help",
description: "Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked question mark" , e.key)
},
{
key: "ctrl + ?",
label: "help",
description: "Shift + Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked ctrl + question mark" , e.key)
},
{
key: "f2",
preventDefault: true,
label: "help",
description: "Open Help menu",
allowIn: [AllowIn.Textarea],
command: e => console.log("clicked ~ sign" , e.key)
},
{
key: "?",
label: "help",
description: "Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked question mark" , e.key)
},
{
key: "ctrl + ?",
label: "help",
description: "Shift + Question mark",
preventDefault: true,
allowIn: [AllowIn.Textarea, AllowIn.Input, AllowIn.Select],
command: e => console.log("clicked ctrl + question mark" , e.key)
},
{
key: "f2",
preventDefault: true,
label: "help",
description: "Open Help menu",
allowIn: [AllowIn.Textarea],
command: e => console.log("clicked " , e.key)
},
{
key: "cmd + ?",
command: (output: ShortcutEventOutput) => console.log(output),
preventDefault: true,
throttleTime: 250,
},
},
{
key: ["cmd + shift + L", "ctrl + shift + L"],
allowIn: [AllowIn.Textarea],
command: e => this.markDown.optionChanged.next(OPTION.LIST),
preventDefault: true
},
{
key: ["cmd + shift + C", "ctrl + shift + C"],
allowIn: [AllowIn.Textarea],
command: e => this.markDown.optionChanged.next(OPTION.CHECK_BOX),
preventDefault: true
},
{
key: ["cmd + shift + Q", "ctrl + shift + Q"],
allowIn: [AllowIn.Textarea],
command: e => this.markDown.optionChanged.next(OPTION.BLOCK_QUOTE),
preventDefault: true
},
{
key: ["cmd + shift + D", "ctrl + shift + D"],
allowIn: [AllowIn.Textarea],
command: e => this.markDown.optionChanged.next(OPTION.CODE),
preventDefault: true
},
{
key: ["cmd + shift + T", "ctrl + shift + T"],
allowIn: [AllowIn.Textarea],
command: e => this.markDown.optionChanged.next(OPTION.TABLE),
preventDefault: true
},
{
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { KeyboardShortcutsModule } from "ng-keyboard-shortcuts";
import { AppRoutingModule } from './app-routing.module';
import { GettingStartedComponent } from './getting-started/getting-started.component';
import { HomeComponent } from './home/home.component';
import { MaterialModule } from "./material-module";
@NgModule({
imports: [
BrowserModule,
KeyboardShortcutsModule.forRoot(),
BrowserAnimationsModule,
MaterialModule,
AppRoutingModule,
],
declarations: [AppComponent, GettingStartedComponent, HomeComponent],
bootstrap: [AppComponent]
})
export class AppModule {}