]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Add starting point for IME support
authorDaniel Imms <daimms@microsoft.com>
Tue, 12 Jul 2016 23:50:07 +0000 (16:50 -0700)
committerDaniel Imms <daimms@microsoft.com>
Tue, 12 Jul 2016 23:50:07 +0000 (16:50 -0700)
src/xterm.js

index a33261c0288a3c3391c635e3065bb0ab0b4df5a4..6682f83a157b6a4775323311eb0fc90dbab92ba7 100644 (file)
         // Truncate the textarea's value, since it is not needed
         this.value = '';
       }, true);
+
+      on(term.textarea, 'compositionstart', function(ev) {
+        console.log('compositionstart', ev);
+        // TODO: Set a composing flag
+      });
+      on(term.textarea, 'compositionupdate', function(ev) {
+        console.log('compositionupdate', ev);
+        // TODO: Display text being composed in the UI (needs to be handled in keydown)
+      });
+      on(term.textarea, 'compositionend', function(ev) {
+        console.log('compositionend', ev);
+        // TODO: Send composed text to the pty
+        // TODO: Remove composing flag
+      });
     };
 
     /**
     // Key Resources:
     // https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
     Terminal.prototype.keyDown = function(ev) {
+      // TODO: Ignore event if currently composing text
+
       var self = this;
       var result = this.evaluateKeyEscapeSequence(ev);