TeselaGen / tg-oss

Teselagen Open Source modules
https://teselagen.github.io/tg-oss/
MIT License
37 stars 18 forks source link

OVE: Disabling keyboard shortcuts #86

Closed manulera closed 2 weeks ago

manulera commented 2 weeks ago

Hi @tnrich, is there a way to disable the keyboard shortcuts? As in, a way to prevent the overriding of things like ctrl+P, etc. I believe in the library you call them "keycombos". I looked around but I could not see an obvious place to disable them.

tnrich commented 2 weeks ago

Hi @manulera I added a massageCmds prop to OVE:

It can be used like so:

                massageCmds={cmds => {
                  //just using the print cmd here as an example but other cmds are also valid targets for modifying
                  delete cmds.print.hotkey; //could also change the hotkey to something else 
                  return cmds;
                }}

It also is on the demo page.

Lemme know if that does the trick for ya.

manulera commented 2 weeks ago

Thanks! Worked perfectly!