{"id":196,"date":"2021-01-27T16:38:35","date_gmt":"2021-01-28T00:38:35","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/math-in-office\/?p=196"},"modified":"2021-04-19T11:27:10","modified_gmt":"2021-04-19T18:27:10","slug":"richedit-emoticon-shortcuts","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/math-in-office\/richedit-emoticon-shortcuts\/","title":{"rendered":"RichEdit Emoticon Shortcuts"},"content":{"rendered":"<p>Seems many email messages and IM\u2019s include emoji smiley faces like \ud83d\ude0a. You just type \ud83d\ude42 and you get \ud83d\ude09 whether you want it or not! About a year ago, the Microsoft 365 RichEdit started offering such a facility. This post describes the built-in emoticon shortcut strings and the corresponding emoji characters and the APIs for enabling the conversions. For a substantially larger set of emoticons, see <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_emoticons\">https:\/\/en.wikipedia.org\/wiki\/List_of_emoticons<\/a>. That list includes both Western and Eastern emoticons. The RichEdit emoticon shortcuts currently include only Western emoticons.<\/p>\n<p>The build-in emoticon shortcuts are defined in the table<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Type<\/strong><\/td>\n<td><strong>Get<\/strong><\/td>\n<td><strong>Unicode<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>%)<\/code><\/td>\n<td>\ud83d\ude15<\/td>\n<td>U+1F615<\/td>\n<\/tr>\n<tr>\n<td><code>0:)<\/code><\/td>\n<td>\ud83d\ude07<\/td>\n<td>U+1F607<\/td>\n<\/tr>\n<tr>\n<td><code>:'(<\/code><\/td>\n<td>\ud83d\ude22<\/td>\n<td>U+1F622<\/td>\n<\/tr>\n<tr>\n<td><code>:')<\/code><\/td>\n<td>\ud83d\ude02<\/td>\n<td>U+1F602<\/td>\n<\/tr>\n<tr>\n<td><code>:'-(<\/code><\/td>\n<td>\ud83d\ude22<\/td>\n<td>U+1F622<\/td>\n<\/tr>\n<tr>\n<td><code>:'-)<\/code><\/td>\n<td>\ud83d\ude02<\/td>\n<td>U+1F602<\/td>\n<\/tr>\n<tr>\n<td><code>:(<\/code><\/td>\n<td>\u2639<\/td>\n<td>U+02639<\/td>\n<\/tr>\n<tr>\n<td><code>:)<\/code><\/td>\n<td>\u263a\ufe0f<\/td>\n<td>U+0263A<\/td>\n<\/tr>\n<tr>\n<td><code>:+1:<\/code><\/td>\n<td>\ud83d\udc4d<\/td>\n<td>U+1F44D<\/td>\n<\/tr>\n<tr>\n<td><code>:-(<\/code><\/td>\n<td>\u2639<\/td>\n<td>U+02639<\/td>\n<\/tr>\n<tr>\n<td><code>:-)<\/code><\/td>\n<td>\ud83d\ude0a<\/td>\n<td>U+1F60A<\/td>\n<\/tr>\n<tr>\n<td><code>:-D<\/code><\/td>\n<td>\ud83d\ude03<\/td>\n<td>U+1F603<\/td>\n<\/tr>\n<tr>\n<td><code>:-o<\/code><\/td>\n<td>\ud83d\ude32<\/td>\n<td>U+1F632<\/td>\n<\/tr>\n<tr>\n<td><code>:-p<\/code><\/td>\n<td>\ud83d\ude1d<\/td>\n<td>U+1F61D<\/td>\n<\/tr>\n<tr>\n<td><code>:-|<\/code><\/td>\n<td>\ud83d\ude10<\/td>\n<td>U+1F610<\/td>\n<\/tr>\n<tr>\n<td><code>:D<\/code><\/td>\n<td>\ud83d\ude03<\/td>\n<td>U+1F603<\/td>\n<\/tr>\n<tr>\n<td><code>:fire:<\/code><\/td>\n<td>\ud83d\udd25<\/td>\n<td>U+1F525<\/td>\n<\/tr>\n<tr>\n<td><code>:grin:<\/code><\/td>\n<td>\ud83d\ude01<\/td>\n<td>U+1F601<\/td>\n<\/tr>\n<tr>\n<td><code>:o<\/code><\/td>\n<td>\ud83d\ude32<\/td>\n<td>U+1F632<\/td>\n<\/tr>\n<tr>\n<td><code>:p<\/code><\/td>\n<td>\ud83d\ude1d<\/td>\n<td>U+1F61D<\/td>\n<\/tr>\n<tr>\n<td><code>:smile:<\/code><\/td>\n<td>\ud83d\ude04<\/td>\n<td>U+1F604<\/td>\n<\/tr>\n<tr>\n<td><code>:yum:<\/code><\/td>\n<td>\ud83d\ude0b<\/td>\n<td>U+1F60B<\/td>\n<\/tr>\n<tr>\n<td><code>:|<\/code><\/td>\n<td>\ud83d\ude10<\/td>\n<td>U+1F610<\/td>\n<\/tr>\n<tr>\n<td><code>;)<\/code><\/td>\n<td>\ud83d\ude09<\/td>\n<td>U+1F609<\/td>\n<\/tr>\n<tr>\n<td><code>;-)<\/code><\/td>\n<td>\ud83d\ude09<\/td>\n<td>U+1F609<\/td>\n<\/tr>\n<tr>\n<td><code>&lt;\/3<\/code><\/td>\n<td>\ud83d\udc94<\/td>\n<td>U+1F494<\/td>\n<\/tr>\n<tr>\n<td><code>&lt;3<\/code><\/td>\n<td>\u2764<\/td>\n<td>U+02764<\/td>\n<\/tr>\n<tr>\n<td><code>&gt;:)<\/code><\/td>\n<td>\ud83d\ude08<\/td>\n<td>U+1F608<\/td>\n<\/tr>\n<tr>\n<td><code>B-)<\/code><\/td>\n<td>\ud83d\ude0e<\/td>\n<td>U+1F60E<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2>How to enable emoticon shortcuts<\/h2>\n<p>The emoticon shortcut facility is incorporated into the RichEdit autocorrect facility. To enable the autocorrect facility, send the message <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/controls\/em-setautocorrectproc\">EM_SETAUTOCORRECTPROC<\/a> with wparam = an AutoCorrectProc callback pointer. If you don\u2019t want to implement an autocorrect callback, set wparam = 1. This activates the built-in math autocorrect facility in math zones. It also activates emoticon shortcuts if they\u2019re enabled. To enable the emoticon shortcuts, get the current language-option flags by sending <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/controls\/em-getlangoptions\">EM_GETLANGOPTIONS<\/a>, OR in IMF_EMOTICONSHORTCUTS (0x8000), and send <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/controls\/em-setlangoptions\">EM_SETLANGOPTIONS<\/a> with lparam equal to the result. The emoticon-shortcut option is disabled by default. Have fun \ud83d\ude0e<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seems many email messages and IM\u2019s include emoji smiley faces like \ud83d\ude0a. You just type \ud83d\ude42 and you get \ud83d\ude09 whether you want it or not! About a year ago, the Microsoft 365 RichEdit started offering such a facility. This post describes the built-in emoticon shortcut strings and the corresponding emoji characters and the APIs [&hellip;]<\/p>\n","protected":false},"author":40611,"featured_media":55,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-math-in-office"],"acf":[],"blog_post_summary":"<p>Seems many email messages and IM\u2019s include emoji smiley faces like \ud83d\ude0a. You just type \ud83d\ude42 and you get \ud83d\ude09 whether you want it or not! About a year ago, the Microsoft 365 RichEdit started offering such a facility. This post describes the built-in emoticon shortcut strings and the corresponding emoji characters and the APIs [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/users\/40611"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/comments?post=196"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts\/196\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/media\/55"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/media?parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/categories?post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/tags?post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}