[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How can I catch the Ctrl_C or Ctrl_V event

yong.yu schrieb:
Dear everyone.
How can I catch the Ctrl_C or Ctrl_V event in the StyledText widget.
Which event listener should I use. KeyListener or anyone else.
Thanks.
--------------------

Yours sincerely,
yuyong


E-mail:yuyong22@xxxxxxxxxxx msn: yuyong22@xxxxxxxxxxx Skype:yuyong88



With a key listener you can listen for CTRL pressed and for C or V pressed. With some variable to store the current state of ctrl you can get ctrl+v or ctrl+c


If you use this don't forget to clear the ctrl pressed on Focus lost as you will then not be notified of keyReleased for CTRL.

Christian