PageRenderTime 47ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/gui/KeyEventWorkaround.html

#
HTML | 345 lines | 290 code | 43 blank | 12 comment | 0 complexity | 1362332067cba2bf719e9518f5a9614d MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:13:57 GMT-08:00 2008 -->
  6. <TITLE>
  7. KeyEventWorkaround (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.gui.KeyEventWorkaround class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/KeyEventWorkaround.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventTranslator.Key.html" title="class in org.gjt.sp.jedit.gui"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/gui/ListModelEditor.html" title="class in org.gjt.sp.jedit.gui"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../../index.html?org/gjt/sp/jedit/gui/KeyEventWorkaround.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="KeyEventWorkaround.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit.gui</FONT>
  66. <BR>
  67. Class KeyEventWorkaround</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.gui.KeyEventWorkaround</B>
  71. </PRE>
  72. <HR>
  73. <DL>
  74. <DT><PRE>public class <B>KeyEventWorkaround</B><DT>extends java.lang.Object</DL>
  75. </PRE>
  76. <P>
  77. Various hacks to get keyboard event handling to behave in a consistent manner
  78. across Java implementations. This type of stuff should not be necessary, but
  79. Java's keyboard handling is crap, to put it mildly.
  80. <P>
  81. <P>
  82. <HR>
  83. <P>
  84. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  85. <A NAME="constructor_summary"><!-- --></A>
  86. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  87. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  88. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  89. <B>Constructor Summary</B></FONT></TH>
  90. </TR>
  91. <TR BGCOLOR="white" CLASS="TableRowColor">
  92. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#KeyEventWorkaround()">KeyEventWorkaround</A></B>()</CODE>
  93. <BR>
  94. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  95. </TR>
  96. </TABLE>
  97. &nbsp;
  98. <!-- ========== METHOD SUMMARY =========== -->
  99. <A NAME="method_summary"><!-- --></A>
  100. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  101. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  102. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  103. <B>Method Summary</B></FONT></TH>
  104. </TR>
  105. <TR BGCOLOR="white" CLASS="TableRowColor">
  106. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  107. <CODE>static&nbsp;boolean</CODE></FONT></TD>
  108. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#isBindable(int)">isBindable</A></B>(int&nbsp;keyCode)</CODE>
  109. <BR>
  110. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  111. </TR>
  112. <TR BGCOLOR="white" CLASS="TableRowColor">
  113. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  114. <CODE>static&nbsp;boolean</CODE></FONT></TD>
  115. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#isMacControl(java.awt.event.KeyEvent)">isMacControl</A></B>(java.awt.event.KeyEvent&nbsp;evt)</CODE>
  116. <BR>
  117. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apple sucks.</TD>
  118. </TR>
  119. <TR BGCOLOR="white" CLASS="TableRowColor">
  120. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  121. <CODE>static&nbsp;boolean</CODE></FONT></TD>
  122. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#isNumericKeypad(int)">isNumericKeypad</A></B>(int&nbsp;keyCode)</CODE>
  123. <BR>
  124. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  125. </TR>
  126. <TR BGCOLOR="white" CLASS="TableRowColor">
  127. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  128. <CODE>static&nbsp;boolean</CODE></FONT></TD>
  129. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#isPrintable(int)">isPrintable</A></B>(int&nbsp;keyCode)</CODE>
  130. <BR>
  131. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We need to know if a keycode can potentially result in a
  132. keytyped.</TD>
  133. </TR>
  134. <TR BGCOLOR="white" CLASS="TableRowColor">
  135. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  136. <CODE>static&nbsp;void</CODE></FONT></TD>
  137. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#numericKeypadKey()">numericKeypadKey</A></B>()</CODE>
  138. <BR>
  139. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A workaround for non-working NumLock status in some Java versions.</TD>
  140. </TR>
  141. <TR BGCOLOR="white" CLASS="TableRowColor">
  142. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  143. <CODE>static&nbsp;java.awt.event.KeyEvent</CODE></FONT></TD>
  144. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventWorkaround.html#processKeyEvent(java.awt.event.KeyEvent)">processKeyEvent</A></B>(java.awt.event.KeyEvent&nbsp;evt)</CODE>
  145. <BR>
  146. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  147. </TR>
  148. </TABLE>
  149. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  150. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  151. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  152. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  153. </TR>
  154. <TR BGCOLOR="white" CLASS="TableRowColor">
  155. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  156. </TR>
  157. </TABLE>
  158. &nbsp;
  159. <P>
  160. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  161. <A NAME="constructor_detail"><!-- --></A>
  162. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  163. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  164. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  165. <B>Constructor Detail</B></FONT></TH>
  166. </TR>
  167. </TABLE>
  168. <A NAME="KeyEventWorkaround()"><!-- --></A><H3>
  169. KeyEventWorkaround</H3>
  170. <PRE>
  171. public <B>KeyEventWorkaround</B>()</PRE>
  172. <DL>
  173. </DL>
  174. <!-- ============ METHOD DETAIL ========== -->
  175. <A NAME="method_detail"><!-- --></A>
  176. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  177. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  178. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  179. <B>Method Detail</B></FONT></TH>
  180. </TR>
  181. </TABLE>
  182. <A NAME="isBindable(int)"><!-- --></A><H3>
  183. isBindable</H3>
  184. <PRE>
  185. public static boolean <B>isBindable</B>(int&nbsp;keyCode)</PRE>
  186. <DL>
  187. <DD><DL>
  188. </DL>
  189. </DD>
  190. </DL>
  191. <HR>
  192. <A NAME="isPrintable(int)"><!-- --></A><H3>
  193. isPrintable</H3>
  194. <PRE>
  195. public static boolean <B>isPrintable</B>(int&nbsp;keyCode)</PRE>
  196. <DL>
  197. <DD>We need to know if a keycode can potentially result in a
  198. keytyped.
  199. <P>
  200. <DD><DL>
  201. <DT><B>Since:</B></DT>
  202. <DD>jEdit 4.3pre2</DD>
  203. </DL>
  204. </DD>
  205. </DL>
  206. <HR>
  207. <A NAME="isMacControl(java.awt.event.KeyEvent)"><!-- --></A><H3>
  208. isMacControl</H3>
  209. <PRE>
  210. public static boolean <B>isMacControl</B>(java.awt.event.KeyEvent&nbsp;evt)</PRE>
  211. <DL>
  212. <DD>Apple sucks.
  213. <P>
  214. <DD><DL>
  215. </DL>
  216. </DD>
  217. </DL>
  218. <HR>
  219. <A NAME="isNumericKeypad(int)"><!-- --></A><H3>
  220. isNumericKeypad</H3>
  221. <PRE>
  222. public static boolean <B>isNumericKeypad</B>(int&nbsp;keyCode)</PRE>
  223. <DL>
  224. <DD><DL>
  225. </DL>
  226. </DD>
  227. </DL>
  228. <HR>
  229. <A NAME="processKeyEvent(java.awt.event.KeyEvent)"><!-- --></A><H3>
  230. processKeyEvent</H3>
  231. <PRE>
  232. public static java.awt.event.KeyEvent <B>processKeyEvent</B>(java.awt.event.KeyEvent&nbsp;evt)</PRE>
  233. <DL>
  234. <DD><DL>
  235. </DL>
  236. </DD>
  237. </DL>
  238. <HR>
  239. <A NAME="numericKeypadKey()"><!-- --></A><H3>
  240. numericKeypadKey</H3>
  241. <PRE>
  242. public static void <B>numericKeypadKey</B>()</PRE>
  243. <DL>
  244. <DD>A workaround for non-working NumLock status in some Java versions.
  245. <P>
  246. <DD><DL>
  247. <DT><B>Since:</B></DT>
  248. <DD>jEdit 4.0pre8</DD>
  249. </DL>
  250. </DD>
  251. </DL>
  252. <!-- ========= END OF CLASS DATA ========= -->
  253. <HR>
  254. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  255. <A NAME="navbar_bottom"><!-- --></A>
  256. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  257. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  258. <TR>
  259. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  260. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  261. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  262. <TR ALIGN="center" VALIGN="top">
  263. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  264. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  265. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  266. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/KeyEventWorkaround.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  267. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  268. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  269. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  270. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  271. </TR>
  272. </TABLE>
  273. </TD>
  274. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  275. </EM>
  276. </TD>
  277. </TR>
  278. <TR>
  279. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  280. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/gui/KeyEventTranslator.Key.html" title="class in org.gjt.sp.jedit.gui"><B>PREV CLASS</B></A>&nbsp;
  281. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/gui/ListModelEditor.html" title="class in org.gjt.sp.jedit.gui"><B>NEXT CLASS</B></A></FONT></TD>
  282. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  283. <A HREF="../../../../../index.html?org/gjt/sp/jedit/gui/KeyEventWorkaround.html" target="_top"><B>FRAMES</B></A> &nbsp;
  284. &nbsp;<A HREF="KeyEventWorkaround.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  285. &nbsp;
  286. <NOSCRIPT>
  287. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  288. </NOSCRIPT>
  289. </FONT></TD>
  290. </TR>
  291. <TR>
  292. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  293. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  294. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  295. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  296. </TR>
  297. </TABLE>
  298. <A NAME="skip-navbar_bottom"></A>
  299. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  300. <HR>
  301. </BODY>
  302. </HTML>