# \<textarea\> on Windows XD does not support Enter key down event

**URL:** <https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358>\
**Category:** UXP Plugin API\
**Created:** [December 19, 2020, 2:04pm UTC](https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358 "2020-12-19T14:04:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stojan](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@stojan](https://forums.creativeclouddeveloper.com/u/stojan)\
**Post date:** [December 19, 2020, 2:04pm UTC](https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358/1 "2020-12-19T14:04:02Z")

</div>

There’s an issue on Windows XD where a `<textarea>` element does not fire the `onKeyDown` event for the `Enter` key. Interestingly, it works fine on Mac.

Any chances for workarounds?

---

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [December 21, 2020, 8:46pm UTC](https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358/2 "2020-12-21T20:46:23Z")

</div>

Hi @stojan,

Interestingly enough, the property that doesn’t work in a lot of other places works here: `onKeyUp`. If that’s an option for you, you could use that.

I did this in my Document Chat plugin, with the relevant source code (written in React) is at [https://github.com/pklaschka/chat-xd-plugin/blob/master/src/components/chat/editor/editor.tsx#L102](https://github.com/pklaschka/chat-xd-plugin/blob/master/src/components/chat/editor/editor.tsx#L102).

If you actually need `onKeyDown` specifically, it would be useful to know the use-case to think about workarounds 😉

I hope this helps,  
Best,  
Pablo

---

<div class="post-metadata">

**Author:** ![mightyalex](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/mightyalex/32/777_2.png) [@mightyalex](https://forums.creativeclouddeveloper.com/u/mightyalex)\
**Post date:** [December 23, 2020, 7:07pm UTC](https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358/3 "2020-12-23T19:07:13Z")

</div>

Wait, I know the question is for Windows PCs and I haven’t had a chance to test much on it, but is `onKeyUp` supported in XD? 😃 Last time I checked (on macOS) it wasn’t ([https://twitter.com/mightyalex/status/1243987425719959554](https://twitter.com/mightyalex/status/1243987425719959554))

---

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [December 24, 2020, 2:48pm UTC](https://forums.creativeclouddeveloper.com/t/textarea-on-windows-xd-does-not-support-enter-key-down-event/2358/4 "2020-12-24T14:48:19Z")

</div>

I don’t really know. Personally, I’ve only been able to test it on WIndows, where, in the example above, it works fine. Since I’ve also had many users on macOS report the Document Chat plugin working, I assume that there must be at least some level of support 😉.

I also, during development, thought that it would only work with `onKeyDown`, which, as this thread states, actually doesn’t work. When, instead, I used `onKeyUp`, it began to work 🤣…
