Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Extension org.eclipse.ui.bindings (Extension org.eclipse.ui.bindings)
Extension org.eclipse.ui.bindings [message #492166] Mon, 19 October 2009 08:33 Go to next message
JUNG  is currently offline JUNG Friend
Messages: 3
Registered: September 2009
Junior Member
Hello Everybody,

In RCP, the extension org.eclipse.ui.bindings allows to
associate keys with commands (e.g. Ctrl-C with copy command).

I tried to do the same thing in RAP (1.2).
But it seems that org.eclipse.ui.bindings does not exist.
How can we do this in RAP?

Thank you in advance for your help.
Best regards,

JUNG


Re: Extension org.eclipse.ui.bindings [message #492203 is a reply to message #492166] Mon, 19 October 2009 12:48 Go to previous message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Hello Jung,

I'm not a platform developer, but a user.

From my point of view, this is a challenging task, because the browser
will intercept certain keys or combinations. You really can't do much
with the control key, as some browsers use it for keyboard shortcuts and
intercept it before it gets to any scripts.

Here's some simple javascript code that you can use to register your own
handler for the entire document. It can catch key-events, except for
those that got intercepted by browser.

var myKeydown = function(e)
{
if(typeof window.event!="undefined"){
e=window.event;//code for IE
}

// TODO
}


if(document.addEventListener) // Opera, Mozilla
{
document.addEventListener("keydown",myKeydown ,false);
document.addEventListener("keypress",myKeydown ,false);
}
else
{
document.attachevent("onkeydown",myKeydown ); //code for IE
document.attachevent("onkeypress",myKeydown );
}

Dmitry

JUNG wrote:
> Hello Everybody,
> In RCP, the extension org.eclipse.ui.bindings allows to associate keys
> with commands (e.g. Ctrl-C with copy command).
> I tried to do the same thing in RAP (1.2). But it seems that
> org.eclipse.ui.bindings does not exist. How can we do this in RAP?
> Thank you in advance for your help.
> Best regards,
> JUNG
>
>
>
Previous Topic:Rearrangement of controls
Next Topic:Problem of selection by selectAll of Text
Goto Forum:
  


Current Time: Wed Apr 24 22:18:54 GMT 2024

Powered by FUDForum. Page generated in 0.03391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top