Groups
Groups
Sign in
Groups
Groups
Ajax.org Cloud9 Editor (Ace)
Conversations
About
Send feedback
Help
not receiving some keydown events
25 views
Skip to first unread message
matt richards
unread,
Aug 3, 2024, 7:12:09 PM
8/3/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ajax.org Cloud9 Editor (Ace)
some keydown events are not received, such as 'tab' and 'delete' maybe others, take the following source
<div id=editor style=height:300px></div>
<div id=output></div>
<script type=module>
import ace from '
https://cdn.jsdelivr.net/npm/ace-builds/+esm
';
var editor = ace.edit('editor');
editor.container.onkeydown = e=>output.append(e.key);
</script>
codepen : ace-key-test
many thanks, ace editor is an excellent work
Harutyun Amirjanyan
unread,
Aug 4, 2024, 4:42:01 AM
8/4/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ace-d...@googlegroups.com
editor stops propagation of events that are handled. You can use capturing event listener to get these events before the editor
editor.container.addEventListener("keydown", e=>output.append(e.key), true);
Reply all
Reply to author
Forward
0 new messages