Features: - Welcome screen on first run (provider choice before LS starts) - 15+ AI providers (Google Gemini, OpenAI, Anthropic, DeepSeek, Ollama, etc.) - Provider config syncs to endpoints.json for translation proxy - Built-in Node.js translation proxy for non-native backends - Auto-update support, tray integration, URI scheme handler
20 lines
760 B
JavaScript
20 lines
760 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.registerKeybindings = registerKeybindings;
|
|
const utils_1 = require("./utils");
|
|
function registerKeybindings(win, actions) {
|
|
win.webContents.on('before-input-event', (event, input) => {
|
|
if (input.type === 'keyDown') {
|
|
const isCmdOrCtrl = (0, utils_1.isMacOS)() ? input.meta : input.control;
|
|
if (isCmdOrCtrl && input.shift && input.key.toLowerCase() === 'n') {
|
|
actions.createNewWindow();
|
|
event.preventDefault();
|
|
}
|
|
if (isCmdOrCtrl && input.key.toLowerCase() === 'q') {
|
|
actions.onQuitRequested();
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
});
|
|
}
|