diff --git a/main.py b/main.py index 28dbb0c..1684813 100644 --- a/main.py +++ b/main.py @@ -86,15 +86,16 @@ class KeywordQueryEventListener(EventListener): image_path = get_character_icon(char) encoded = htmlentities.encode(char.character) if "&" in encoded: - entity = " - " + encoded + sep = " - " else: - entity = "" + sep = "" items.append( ExtensionResultItem( icon=image_path, name=char.name.capitalize() + " - " + char.character, - description=char.block + " - U+" + char.code + entity, + description=char.block + " - U+" + char.code + sep + encoded, on_enter=CopyToClipboardAction(char.character), + on_alt_enter=CopyToClipboardAction(encoded), ) ) return RenderResultListAction(items) diff --git a/manifest.json b/manifest.json index 717c36b..8527ee9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Symbol search", - "description": "Search symbols in ASCII and Unicode and copy them to the clipboard. Dark mode friendly.", + "description": "Search symbols in ASCII and Unicode. Enter to copy the symbol, alt+enter to copy the HTML entity. Dark mode friendly.", "developer_name": "Ivan Boothe", "icon": "images/insertion-symbol.png", "required_api_version": "^2.0.0", @@ -12,7 +12,7 @@ "id": "symbol", "type": "keyword", "name": "Symbol", - "description": "Search symbols in ASCII and Unicode and copy them to the clipboard. Dark mode friendly.", + "description": "Search symbols in ASCII and Unicode. Enter to copy the symbol, alt+enter to copy the HTML entity. Dark mode friendly.", "default_value": "sym" } ]