SWT constant for space key [message #464742] |
Tue, 29 November 2005 13:04 |
Eclipse User |
|
|
|
Originally posted by: e.s.com
I would like to display content assist information when the user presses
both the CTRL and SPACE keys.
the code looks the following:
sourceViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
switch (e.keyCode) {
case // CTRL and SPACE :
assistant.showPossibleCompletions();
break;
default:
//ignore everything else
}
}
});
I couldn't find SWT.SPACE and how do I capture when the user presses both
keys?
thanks in advance
|
|
|
Re: SWT constant for space key [message #464744 is a reply to message #464742] |
Tue, 29 November 2005 13:24 |
Eclipse User |
|
|
|
Originally posted by: friederich.kupzog.de
Hi,
the ASCII code for space is 32. Or use char == ' '.
Regards,
Friederich
Erel wrote:
> I would like to display content assist information when the user presses
> both the CTRL and SPACE keys.
> the code looks the following:
> sourceViewer.getControl().addKeyListener(new KeyAdapter() {
> public void keyPressed(KeyEvent e) {
> switch (e.keyCode) {
> case // CTRL and SPACE :
> assistant.showPossibleCompletions();
> break;
> default:
> //ignore everything else
> }
> }
> });
>
> I couldn't find SWT.SPACE and how do I capture when the user presses
> both keys?
>
> thanks in advance
>
--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
|
|
|
|
Powered by
FUDForum. Page generated in 0.03343 seconds