gfn-electron icon indicating copy to clipboard operation
gfn-electron copied to clipboard

fixing #241

Open andro404-MC opened this issue 9 months ago • 0 comments

Fixing #241

but required removing for causing infinite recursion :

globalShortcut.register('Esc', async () => {
    var window = BrowserWindow.getAllWindows()[0];

    window.webContents.sendInputEvent({
      type: 'keyDown',
      keyCode: 'Esc'
    });
    window.webContents.sendInputEvent({
      type: 'char',
      keyCode: 'Esc'
    });
    window.webContents.sendInputEvent({
      type: 'keyUp',
      keyCode: 'Esc'
    });

    window.webContents.sendInputEvent({
      type: 'keyDown',
      keyCode: 'Esc'
    });
    window.webContents.sendInputEvent({
      type: 'char',
      keyCode: 'Esc'
    });
    window.webContents.sendInputEvent({
      type: 'keyUp',
      keyCode: 'Esc'
    });
  });

I don't understand the purpose of that code, can you explain ??

andro404-MC avatar May 11 '24 17:05 andro404-MC