[
https://issues.apache.org/jira/browse/PIVOT-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778887#action_12778887
]
Greg Brown commented on PIVOT-343:
----------------------------------
I understand. However, these characters are entered on the keyboard by holding
down the Control key while typing the corresponding control character letter
key. See the chart on this page:
http://en.wikipedia.org/wiki/ASCII
This means that any application should be able to intercept the keyPressed()
event for the ENTER key rather than the keyTyped() event for the "\r"
character, for example.
Assuming that the bar code scanner in question correctly emulates the keyboard
behavior and fires keyPressed()/keyReleased() in addition to keyTyped(), I
don't see a use case for supporting control characters in keyTyped().
> Handle Control Characters in Input Fields
> -----------------------------------------
>
> Key: PIVOT-343
> URL: https://issues.apache.org/jira/browse/PIVOT-343
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Reporter: Sandro Martini
> Priority: Minor
> Fix For: 2.0
>
>
> In TextInput (or at least in TextArea, then possibly in any other component
> that accept input form the user) could be useful to have a property to set
> what to do with Control Chars, like in dot Net components.
> This is important for example with some applications reading data from
> instruments (for example BarCode Scanners), where usually at the end of any
> code read will be appended a CR LF as a marker, and in this case these chars
> have to be accepted in the field but not displayed.
> The default behavior should be to filter them out in all components (but not
> in multi-line components, like TextArea), but if the filtering is disabled
> (maybe with a dedicated style property) we could use another style property
> to set the desired formatting (by default nothing, or maybe a given char like
> space, etc).
> So what do you think on a style like "escapeControlCharacters" to control the
> display part, with some flag values, like "space", "none" or "null", etc ?
> And another style like "filterControlCharacters" by default true (remove any
> non printable char, but in a i18n context could not be so simple to know if a
> char is displayable, right ? or maybe we could have here a regexp but could
> be too heavy ... ideas ?) and if false it keep all chars as given.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.