Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to invoke clipboard actions in a portable way
How to invoke clipboard actions in a portable way [message #445176] Wed, 27 October 2004 14:23 Go to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Different platforms use different key-kombinations for clipboard
actions. Is there any way to use these in SWT ?
I would consider it an ugly hack to code a switch statement using a
different listener for each platform.


Exmaple: copy
Windows: STRG+C
Mac: COMMAND+C

note:
COMMAND!=STRG
macos has a STRG-key, too

Yves
Re: How to invoke clipboard actions in a portable way [message #445184 is a reply to message #445176] Wed, 27 October 2004 15:29 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Investigate the SWT.MOD1 etc. constants. This will help with
SWT.COMMAND+'C' vs SWT.CTRL+'C'.

"Yves Harms" <user@domain.invalid> wrote in message
news:cloafb$8j3$1@eclipse.org...
> Different platforms use different key-kombinations for clipboard
> actions. Is there any way to use these in SWT ?
> I would consider it an ugly hack to code a switch statement using a
> different listener for each platform.
>
>
> Exmaple: copy
> Windows: STRG+C
> Mac: COMMAND+C
>
> note:
> COMMAND!=STRG
> macos has a STRG-key, too
>
> Yves
Re: How to invoke clipboard actions in a portable way [message #445196 is a reply to message #445184] Thu, 28 October 2004 06:50 Go to previous messageGo to next message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Thanks for the pointer.
Where can I find the mapping of SWT.MODx for a platform in the eclipse
source ?



Steve Northover wrote:
> Investigate the SWT.MOD1 etc. constants. This will help with
> SWT.COMMAND+'C' vs SWT.CTRL+'C'.
>
> "Yves Harms" <user@domain.invalid> wrote in message
> news:cloafb$8j3$1@eclipse.org...
>
>>Different platforms use different key-kombinations for clipboard
>>actions. Is there any way to use these in SWT ?
>>I would consider it an ugly hack to code a switch statement using a
>>different listener for each platform.
>>
>>
>>Exmaple: copy
>>Windows: STRG+C
>>Mac: COMMAND+C
>>
>>note:
>>COMMAND!=STRG
>>macos has a STRG-key, too
>>
>>Yves
>
>
>
Re: How to invoke clipboard actions in a portable way [message #445213 is a reply to message #445196] Thu, 28 October 2004 13:51 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
They are platform dependent and initialized in the class
org.eclipse.swt.SWT. How about using Eclipse to browse references to
SWT.MOD1?

"Yves Harms" <user@domain.invalid> wrote in message
news:clq4jv$c6a$1@eclipse.org...
> Thanks for the pointer.
> Where can I find the mapping of SWT.MODx for a platform in the eclipse
> source ?
>
>
>
> Steve Northover wrote:
> > Investigate the SWT.MOD1 etc. constants. This will help with
> > SWT.COMMAND+'C' vs SWT.CTRL+'C'.
> >
> > "Yves Harms" <user@domain.invalid> wrote in message
> > news:cloafb$8j3$1@eclipse.org...
> >
> >>Different platforms use different key-kombinations for clipboard
> >>actions. Is there any way to use these in SWT ?
> >>I would consider it an ugly hack to code a switch statement using a
> >>different listener for each platform.
> >>
> >>
> >>Exmaple: copy
> >>Windows: STRG+C
> >>Mac: COMMAND+C
> >>
> >>note:
> >>COMMAND!=STRG
> >>macos has a STRG-key, too
> >>
> >>Yves
> >
> >
> >
Previous Topic:KeyEvent for Text
Next Topic:Copy clipboard into a blob
Goto Forum:
  


Current Time: Sat Apr 27 04:13:54 GMT 2024

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

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

Back to the top