An electron-based WIP aesthetic file explorer ^^
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
FileKade/scripts/keybinds/handleKey.js

14 lines
408 B

const mousetrap = require('../dep/mousetrap');
const electron = require('electron'); const ipc = electron.ipcRenderer;
const binds = require('../../json/shortcuts.json');
module.exports = () => {
const sendIpcMessage = (message) => {
ipc.sendSync('keybind', message);
};
Object.keys(binds).forEach((bind) => {
mousetrap.bind(bind, () => sendIpcMessage(binds[bind]));
});
};