File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "version" : " 1.0.4 " ,
2+ "version" : " 1.0.5 " ,
33 "license" : " MIT" ,
44 "main" : " dist/index.js" ,
55 "typings" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export const KeyBindContext = createContext({} as KeyBindContextState);
1919const KeyBindProvider : FC < KeyBindProviderPropsI > = ( {
2020 children,
2121 shortcuts = [ ] ,
22+ debug = false ,
2223} ) => {
2324 const [ storeShortcuts , setStoreCommands ] = useState ( shortcuts ) ;
2425
@@ -28,7 +29,7 @@ const KeyBindProvider: FC<KeyBindProviderPropsI> = ({
2829 return [
2930 ...( prev ?. filter ( s => {
3031 const isDuplicated = isDuplicate ( prev , s ) ;
31- if ( isDuplicated ) {
32+ if ( isDuplicated && debug ) {
3233 console . warn ( logMsg ( s , shortcut ) ) ;
3334 }
3435 return ! isDuplicated ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { PlatformType } from './platform.type';
44export interface KeyBindProviderPropsI {
55 children ?: React . ReactNode ;
66 shortcuts ?: ShortcutType [ ] ;
7+ debug ?: boolean ;
78}
89
910export type KeysType = {
You can’t perform that action at this time.
0 commit comments