import "@quickey/ui/lib/legend/styles/legend.scss" ; import { createQuickey } from "@quickey/core" ; import { createQuickeyLegend } from "@quickey/ui" ; import "./reactRenderer" ; createQuickey ( { id : "first" , title : "Common Shortcuts" , target : document . querySelector ( "#container1" ) } ) . addAction ( { keys : "I > D > K > F > A" , description : "All weapons" , strict : false , delay : 500 , callback : ( _ , target ) => { console . log ( "Key and FULL AMMO!" , target ) ; } } ) . addAction ( { keys : "I > D > D > Q > D" , description : "GOD mode" , strict : false , delay : 500 , callback : ( _ , target ) => { console . log ( "GOD Mode!" , target ) ; } } ) . addAction ( { keys : "Ctrl > Ctrl" , description : "Save document" , strict : false , callback : ( _ , target ) => { console . log ( `We are testing the strict mode` , target ) ; } } ) . addAction ( { keys : "Ctrl + +" , description : "Increase text size" , strict : true , callback : ( _ , target ) => { console . log ( `Give me some plus!` , target ) ; } } ) . addAction ( { id : "hello" , keys : "Ctrl + H" , description : "Show help" , strict : true , callback : ( _ , target ) => { console . log ( "Hello World!" , target ) ; } } ) ; createQuickey ( { id : "cheats" , title : "Cheat Codes" } ) . addAction ( { keys : "I > D > D > Q > D" , description : "Invulnerability" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "I > D > K > F > A" , description : "Full health, ammo, weapons, armor and keys" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "I > D > F > A" , description : "Full health, ammo, weapons, and armor" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "I > D > D > T" , description : "Change map detail" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "I > D > C > H > O > P > P > E > R > S" , description : "Gain chainsaw" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "I > D > C > L > I > P" , description : "Walk through walls" , callback : ( _ , target ) => { } } ) ; createQuickey ( { id : "game" , title : "Game Play" } ) . addAction ( { keys : "Ctrl + +" , description : "Map zoom in" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "Ctrl + -" , description : "Map zoom out" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "Ctrl + F1" , description : "Show help screen" , callback : ( _ , target ) => { } } ) . addAction ( { keys : "Ctrl + Q" , strict : true , alias : [ { keys : "K" , strict : true } , { keys : "Ctrl + J" , strict : true } ] , description : "Exit game" , callback : ( _ , target ) => { console . log ( 123 ) ; alert ( 1 ) ; } } ) ; createQuickey ( { id : "second" , title : "Cheats" , target : document . querySelector ( "#container2" ) } ) . addAction ( { keys : "I > D > K > F > A" , description : "All weapons" , strict : false , delay : 500 , callback : ( _ , target ) => { console . log ( "Colorize me!!!" , target ) ; target . classList . toggle ( "red" ) ; } } ) ; const destroy = createQuickeyLegend ( { el : document . querySelector ( "#ui" ) , searchBarPlaceholder : "Search shortcut..." , ids : [ "cheats" , "game" ] , style : { width : 640 } } ) ;