blackberry: onkeyup doesn't catch BACKSPACE - blackberry

i need to get value of a INPUT of type TEXT in real time. So i assigned to onkeyup of the INPUT to my function, that evaluates the new value.
It works fine on BB (i use 9780/OS6 for tests) except, that BACKSPACE-Key doesn't fire the event.
Here there's an example of code.
may be you have an idea, how to solve it.
Thanks a lot in advance!
Daniel

Related

Jquery Select2 multiselect with Dragon NaturallySpeaking

I have implemented a select2 multiselect for list of states in a application, and it works fine using typing the state names. But with Dragon NaturallySpeaking software if you speak in select2 to select a state, it only show the last char of what you spoke and do not autosearch, you have to press space to see the whole text and then press backspace to start the search, looks like some event does not fire when you speak than type. Not sure if there is any solution that I can try. I have tried to fire the change event manually.. but not working !
Since the select2 box is not Select and Say, you probably need to dictate into the dictation box and transfer it over. Or, write a script to take in the dictation, convert it to what you need, and then paste it to clipboard. Then go over to box and paste from clipboard. Let us know what worked . . .
I have added a check if the selected element class is select2-search__field then I trigger a $(activeElement).trigger('change') in that element. that seems doing the job

How to use bell character (BEL, CTRL-G, \x07) with xterm.js?

How do I add use the bell character with Xterm.js? I see a couple of entries in the sources 'options' defaults, but dont get anything whether i send it from the shell or write it directly to the terminal, even with those set to true. I tried overloading the term.bell function with one containing a window.navigator.vibrate, and that works if I call it directly, but doesnt fire in response to a bell character.
Ok. So testing determined nothing is blocking the bell character ("\x07" or "\u0007") from getting through to xterm.js. It just doesnt respond, even if you enable the flags in the options. The code in the source looks like it should work, but something internal is not connected. Since I am avoiding actual changes to the source to make upgrades to xterm.js straightforward and out of the box, I worked a little magic. Here's a hack to get the bell character working:
Make a function that fires on the "message" event from your websocket. In it, check for a match for BEL. Then have it do your voodoo if it detects it. Something like:
sock.addEventListener('message',function(v){ if(v.match(/\x07/)){ /*voodoo here*/ } });
Where v is event, \x07 is BEL, and voodoo is code or an invocation to blip the screen white briefly, make a chirp, vibrate if your getting around on "mobile", or open a portal to the single-sock dimension.
Annoyingly, now I need to look up more ansi codes and find a pattern, as some end in a BEL character. So this will work by itself, but will be set off by some codes not intended to act as BEL, because they contain that character. More on this later....
FYI, not sure if this works with term.attach(). I have my own thing that does some preprocessing anyway, so basically all I had to do was splice in the if/match, but cut that out, the above code is the minimal cut-paste version.
Hope this helps someone else. Bug out.

md-chips and md-autocomplete input field

When user enters an input with md-chips and the focus is removed the entry is still there. is there a way to delete any entry that is not a chip once the focus is removed?
The Out Standing Text still shows once the focus is removed
Normally, you should be able to do it by using ng-blur but for some reason there is an issue with that directive in use with md-autocomplete: https://github.com/angular/material/issues/3906
But i tried to solve it differently, not the most correct way, but it works. What you have to do is bind event with blur in input inside md-autocomplete. In this event you have to clear your searchText of md-autocomplete. So just bind that event in your controller somehow like that:
angular.element(document.querySelector('md-autocomplete input')).bind('blur',
function(){
setTimeout(function(){
angular.element(document.querySelector('md-autocomplete')).scope().ctrl.searchText = '';
angular.element(document.querySelector('md-autocomplete')).scope().$apply();
}, 300);
}
)
The reason why I used timeout was the fact that chip was not added if searchText variable was cleared too fast. But when I added 300ms delay it worked as I expected. For sure there is better way to do it, but just try to do it this way and maybe it will be enough for you.
Here is working codepen: http://codepen.io/anon/pen/QdNydx

How to preselect capslock in TouchKeyboard component

I am working with Delphi TTouchKeyboard component. Because in later use people will mainly use capital letters, I would like to preselect capslock.
My problem now is, that the Touchkeyboard only changes its key caption when I click directly on a key. If the state is toggled by an (external) keydown message, one can use capital letters, but the keyboard component will still dislpay small letters on the keys. How could I solve that?
As far as I can see the only work arround is to edit the original source code.
http://qc.embarcadero.com/wc/qcmain.aspx?d=88770 (I haven't tested it)
I've tried to write a patch with this code but with out any luck because I can not acces the private field Fbuttons.
So if you want this you'll have to patch the original code

Primefaces p:autocomplete component doesnot works under dialog box

I am using primefaces p:autocomplete component (primefaces version 3.0), its working fine , but I am getting 2 issues with it.
First is when I am puuting p:autocomplete component inside dialog box ,and if a user gets suggestions after some typing keywords, it stuckes, neither we can type anymore nor we can use backspace .
Second is p:autocomplete component suggestions are case sensitive.But user should get always suggestions whether he didnt used capital letters.
As a e.g: if a name is stored in database as "John" with capital letter, but if a user type 'jo' with small case letter he should get suggestion as a "John".
How can I solve it?
I don't have a specific answer for your first part. Possibly a PF bug. Is it just the autocomplete that sticks? Does the whole browser hang? Are you able to use other controls on the page?
As for the case sensitivity, you would control that in your autocomplete method on the backing bean. If you want to ignore case, use .toLowerCase(), .toUpperCase(), .equalsIgnoreCase() in your compare.

Resources