Improved error handling

When creating a new shortcut and nothing is selected, generate an error.