From: <ez...@us...> - 2013-10-11 18:09:52
|
Revision: 23235 http://jedit.svn.sourceforge.net/jedit/?rev=23235&view=rev Author: ezust Date: 2013-10-11 18:09:45 +0000 (Fri, 11 Oct 2013) Log Message: ----------- arrow key translations for cross-platform usability. Modified Paths: -------------- jEdit/trunk/startup/startup.bsh Modified: jEdit/trunk/startup/startup.bsh =================================================================== --- jEdit/trunk/startup/startup.bsh 2013-10-11 07:54:13 UTC (rev 23234) +++ jEdit/trunk/startup/startup.bsh 2013-10-11 18:09:45 UTC (rev 23235) @@ -18,6 +18,8 @@ setAccessibility(true); } + + /* For the mathematicians among us. */ e = Math.E; pi = Math.PI; @@ -88,6 +90,28 @@ /*}}}*/ +/*{{{ keypad arrows vs regular arrowkeys + Linux distinguishes between keypad arrowkeys and regular arrows, unlike windows. + Uncommenting these translations below makes windows and linux shortcuts work the same way + on both platforms. + +linp = new KeyEventTranslator.Key(null, KeyEvent.VK_KP_LEFT, (char)0); +crossp = new KeyEventTranslator.Key(null, KeyEvent.VK_LEFT, (char)0); +KeyEventTranslator.addTranslation(linp, crossp); +linp = new KeyEventTranslator.Key(null, KeyEvent.VK_KP_RIGHT, (char)0); +crossp = new KeyEventTranslator.Key(null, KeyEvent.VK_RIGHT, (char)0); +KeyEventTranslator.addTranslation(linp, crossp); +linp = new KeyEventTranslator.Key(null, KeyEvent.VK_KP_UP, (char)0); +crossp = new KeyEventTranslator.Key(null, KeyEvent.VK_UP, (char)0); +KeyEventTranslator.addTranslation(linp, crossp); +linp = new KeyEventTranslator.Key(null, KeyEvent.VK_KP_DOWN, (char)0); +crossp = new KeyEventTranslator.Key(null, KeyEvent.VK_DOWN, (char)0); +KeyEventTranslator.addTranslation(linp, crossp); + +}}}*/ + + + /*{{{ Workaround for buggy international key handling */ /* If international keys do not work in the text area, sometimes it is possible This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |