Skip to content

Commit 4c5de55

Browse files
committed
Rename hot key
1 parent 7e6a22f commit 4c5de55

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# PlainBelt
44

5-
> A toolbelt for your plain text
5+
> A toolbelt for your plain text. Work offline. Cross-platform.
66
77
## Features
88

src/components/Main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const Main = () => {
9494
setSearch(e.target.value);
9595
};
9696

97-
ipcRenderer.on('hot-key-called', () => {
97+
ipcRenderer.on('hotkey-pressed', () => {
9898
history.push('/auto');
9999
});
100100

src/components/auto/Auto.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const Auto = () => {
6565
</a>
6666
{hotkey && (
6767
<p className="mt-10 opacity-70">
68-
<em>Hot key</em>: Control+Alt+Meta+Space (⌃⌥⌘Space in Mac)
68+
<em>Hotkey</em>: Control+Alt+Meta+Space (⌃⌥⌘Space in Mac)
6969
</p>
7070
)}
7171
</section>

src/main.dev.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ const createTray = async () => {
150150
tray.setToolTip('PlainBelt');
151151
};
152152

153-
const registerHotKey = () => {
153+
const registerHotkey = () => {
154154
globalShortcut.unregisterAll();
155155
const hotkey = 'Control+Alt+Meta+Space';
156156
const success = globalShortcut.register(hotkey, async () => {
157157
await showWindow();
158-
mainWindow?.webContents.send('hot-key-called');
158+
mainWindow?.webContents.send('hotkey-pressed');
159159
});
160160
if (!success) {
161161
store.set('hotkey', '');
@@ -238,7 +238,7 @@ app.on('will-quit', () => {
238238

239239
app
240240
.whenReady()
241-
.then(registerHotKey)
241+
.then(registerHotkey)
242242
.then(createWindow)
243243
.then(createTray)
244244
.catch(console.log);

0 commit comments

Comments
 (0)