Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/input/command-executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ describe('DesktopCommandExecutor', () => {
await executor.execute(command('keyboard.key', { key: 'Enter' }));
await executor.execute(command('keyboard.key', { key: 'F12' }));
await executor.execute(command('keyboard.key', { key: 'Meta' }));
await executor.execute(command('keyboard.shortcut', { keys: ['Meta'] }));
await executor.execute(command('keyboard.shortcut', { keys: ['Ctrl', 'C'] }));
await executor.execute(command('keyboard.shortcut', { keys: ['Ctrl', 'F5'] }));
await executor.execute(command('keyboard.typeText', { text: 'Hello' }));
Expand All @@ -144,6 +145,7 @@ describe('DesktopCommandExecutor', () => {
{ method: 'pressKey', args: ['Enter'] },
{ method: 'pressKey', args: ['F12'] },
{ method: 'pressKey', args: ['Meta'] },
{ method: 'pressShortcut', args: [['Meta']] },
{ method: 'pressShortcut', args: [['Ctrl', 'C']] },
{ method: 'pressShortcut', args: [['Ctrl', 'F5']] },
{ method: 'typeText', args: ['Hello'] },
Expand All @@ -152,7 +154,7 @@ describe('DesktopCommandExecutor', () => {
]);
expect(overlay.events).toHaveLength(0);
expect(overlay.activeCount).toBe(0);
expect(overlay.hideCount).toBe(9);
expect(overlay.hideCount).toBe(10);
});

it('executes non-movement no-response commands without coalescing', async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/main/input/libnut-win32-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ describe('toLibnutKeyboardKey', () => {
expect(toLibnutKeyboardKey('F12')).toBe('f12');
});

it('maps Meta to the libnut command key', () => {
expect(toLibnutKeyboardKey('Meta')).toBe('command');
it('maps Meta to the libnut Windows key', () => {
expect(toLibnutKeyboardKey('Meta')).toBe('win');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/main/input/libnut-win32-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export function toLibnutKeyboardKey(key: KeyboardKey | ShortcutKey): string {
case 'Shift':
return 'shift';
case 'Meta':
return 'command';
return 'win';
case 'A':
case 'C':
case 'V':
Expand Down