You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Greg Brown (JIRA)" <ji...@apache.org> on 2009/11/17 14:10:39 UTC

[jira] Commented: (PIVOT-343) Handle Control Characters in Input Fields

    [ https://issues.apache.org/jira/browse/PIVOT-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778856#action_12778856 ] 

Greg Brown commented on PIVOT-343:
----------------------------------

I don't think we should change the existing behavior. The keyPressed() and keyReleased() events are still fired when the Control key is pressed. It is only keyTyped() that is not fired in this case (which makes sense, because control characters are non-displayable). Any application that needs to respond to control characters can simply handle it in keyPressed() instead of 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.