Some questions about what Electron can do or not


#1

Hi!

I want to create a macOS application, I already tried to use Swift but it is too hard for me so I’m thinking to move to Electron. But before I move, I want to ask some questions about it so I could know what I can do with Electron and what I cannot do.

Shortcuts

I want to create my own shortcuts that belong to my app (for example, CMD + C + S). Also, I want to be able to use these shortcuts not only inside my app but also outside. For example, I want to be able to run my app, open Chrome, press a shortcut inside Chrome and it would be triggered.

Background running

I want to be able to run my app on the background.

Context menu

I want to be able to have access to the context menu (I’m not sure it calls like that, but here is a screenshot for better understanding) and be able to add my own option.

P.S. I’m not asking how to do this, I’m just asking is there a way to do it so I could know what I can do with Electron and what I cannot do. But if you will share a way how to do something from above I will be very thankful :slight_smile:


#2

If you want OS-level hotkeys, you’re going to have to ask a Mac expert. There may or may not be someone here who can help you, but that’s completely not an Electron question.

I want to be able to run my app on the background.

The main process of your Electron application is the background portion. As long as you don’t open any windows, it will be completely invisible.

I want to be able to have access to the context menu (I’m not sure it calls like that, but here is a screenshot for better understanding) and be able to add my own option.

“Context menu” is the correct terminology, yes. Electron has a Menu API specifically for that purpose.


#3

Are you sure we are talking about the same menu? :slight_smile: I’m talking about context menu that inside another browser (Chrome, Safari, Firefox, Edge).


#4

Then you will have to make an extension for that browser to modify its context menu.


#5

I’m not sure about the Context menu, but shortcuts and background running is possible.


#6

I see, thank you :slight_smile: