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