Implement SHIFT+TAB as [aleft]

0 views
Skip to first unread message

Casey West

unread,
Jun 1, 2007, 1:47:21 PM6/1/07
to socia...@googlegroups.com
Simple code using the Event object available from MooTools. This
checks for `Event.shift` and adjusts our case accordingly.

--
Casey West


Index: WKCjs.txt
===================================================================
--- WKCjs.txt (revision 68)
+++ WKCjs.txt (revision 69)
@@ -101,6 +101,9 @@
case 37: ch="[aleft]"; break;
case 38: ch="[aup]"; break;
case 9:
+ var tab = new Event(e);
+ ch = (tab.shift? "[aleft]" : "[aright]");
+ break;
case 39: ch="[aright]"; break;
case 40: ch="[adown]"; break;
case 13: ch="[enter]"; break;
@@ -143,6 +146,9 @@
case 37: ch="[aleft]"; break;
case 38: ch="[aup]"; break;
case 9:
+ var tab = new Event(e);
+ ch = (tab.shift? "[aleft]" : "[aright]");
+ break;
case 39: ch="[aright]"; break;
case 40: ch="[adown]"; break;
case 13: ch="[enter]"; break;

Reply all
Reply to author
Forward
0 new messages