diff --git a/main.py b/main.py index 25a1d1ed..36e1cc0e 100644 --- a/main.py +++ b/main.py @@ -148,9 +148,11 @@ def perform_key_event(self, accelerator, press, delay=0): def on_event(self, event, extension): code = event.get_data() + action = extension.preferences['action'] copy_action = CopyToClipboardAction(code) copy_action.run() - self.paste() + if action == 'Auto-Insert': + self.paste() if __name__ == '__main__': EmojiExtension().run() diff --git a/manifest.json b/manifest.json index 23737f95..e69f925e 100644 --- a/manifest.json +++ b/manifest.json @@ -11,12 +11,23 @@ "name": "Emoji", "default_value": "em" }, + { + "id": "action", + "type": "select", + "name": "Action", + "description": "Choose the action to perform after picking an emoji", + "default_value": "Auto-Insert", + "options": [ + "Auto-Insert", + "Copy" + ] + }, { "id": "emoji_style", "type": "select", "name": "Emoji Style", "description": "Choose the style of emojis you prefer", - "default_value":"twemoji", + "default_value": "twemoji", "options": [ "apple", "twemoji", @@ -29,7 +40,7 @@ "type": "select", "name": "Fallback Emoji Style", "description": "Choose the style of emojis you prefer, if your first pick isn't available", - "default_value":"noto", + "default_value": "noto", "options": [ "apple", "twemoji",