Re: Replace Enter key by Shift + Enter
Why? What are you trying to accomplish? On Feb 24, 7:44 am, ryan T ryanro...@gmail.com wrote: Hi all, Is there any way to replace Enter key by Shift + Enter for a widget such as RichTextArea? Thanks, ryan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Replace Enter key by Shift + Enter
In your KeyDown event handler, examine the KeyDownEvent to see whether or not the Shift key is down, e.g. if (event.isAnyModifierKeyDown()){ // handle SHIFT-ENTER } else { // handle ENTER event.preventDefault(); } On Feb 24, 5:44 am, ryan T ryanro...@gmail.com wrote: Hi all, Is there any way to replace Enter key by Shift + Enter for a widget such as RichTextArea? Thanks, ryan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Replace Enter key by Shift + Enter
As for the Why, many rich text editors (and word processors) use Shift+Enter for a line-break and Enter for a paragraph break. I'd make the assumption that Ryan is wanting to do something similar. On Feb 24, 9:54 am, Greg Dougherty dougherty.greg...@mayo.edu wrote: Why? What are you trying to accomplish? On Feb 24, 7:44 am, ryan T ryanro...@gmail.com wrote: Hi all, Is there any way to replace Enter key by Shift + Enter for a widget such as RichTextArea? Thanks, ryan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Replace Enter key by Shift + Enter
Hi, I want the rich text editor to do line-break only even though it receives Enter or Shift+Enter. Can I dispatch Shift+Enter to RichTextArea whenever I get Enter? Any idea? Thanks, ryan On Fri, Feb 25, 2011 at 2:18 AM, Falcon msu.fal...@gmail.com wrote: As for the Why, many rich text editors (and word processors) use Shift+Enter for a line-break and Enter for a paragraph break. I'd make the assumption that Ryan is wanting to do something similar. On Feb 24, 9:54 am, Greg Dougherty dougherty.greg...@mayo.edu wrote: Why? What are you trying to accomplish? On Feb 24, 7:44 am, ryan T ryanro...@gmail.com wrote: Hi all, Is there any way to replace Enter key by Shift + Enter for a widget such as RichTextArea? Thanks, ryan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.