Create Keyboard Shortcut for Application

Hello, I’m trying to create a keyboard shortcut for my app, does anyone know how I could do it? I’ve been using globalShortcut but for some reason it has stopped working.