web keypressed doesn't work?

There’s a feedback case about Weblistbox key pressed not working: <https://xojo.com/issue/21741>

Bob's shy and doesn't like to be the centre of attention Really :P

Rectangles and labels don’t get focus. Make sure you use a control that actually can get focus.

that’s my feedback case. I tried with a listbox also.

Can everyone sign into that feedback case?

Got it … found a work around. When you open your webpage keypressed works just fine. If you close a container, keypressed stops working.

So, my app loads with a login container. Keypressed works fine because the webpage is the focus. Instead of closing the login container, just setting visible to false keeps the keypressed working.

I then open a container where the keypressed is supposed to work. To do so I make keypressed in the webpage control the container. Certain mouse clicks in the container will disable the keypressed, so I added a label (button will not work) which is outside of the container and re-activates keypressed.

wahoo …

Anyone have interest in going into your FEEDBACK and making this case a priority?
It is 47th over a year in, I can’t believe no one else thinks this is a priority. The listbox can’t get focus, and won’t process keystrokes.

[quote=159338:@Jim Frankland]Anyone have interest in going into your FEEDBACK and making this case a priority?
It is 47th over a year in, I can’t believe no one else thinks this is a priority. The listbox can’t get focus, and won’t process keystrokes.[/quote]

47 th is not bad, considering not everybody uses WE.

alright . . . . it’s up to 30th. Xojo should also create shortcut keys like Microsoft (if these guys can, xojo can). Should look like it does in windows: Bob Simth

I created my own, but the brilliant guys at Xojo certainly could create something better.

[quote=159481:@John Scanlan]alright . . . . it’s up to 30th. Xojo should also create shortcut keys like Microsoft (if these guys can, xojo can). Should look like it does in windows: Bob Simth

I created my own, but the brilliant guys at Xojo certainly could create something better.[/quote]

What do you mean by “shortcut” ? Any example ?

To select Bob Smith, you can either click on the cell or click “s” on the keyboard. In Microsoft, the shortcut is represent by underlining the character.

It works just the same as in Microsoft languages. Just put & before the hotkey letter.

For instance &Abracadabra will underline A. You can place the & anywhere in the menuitem text.

When using a Windows Xojo app, Alt-Menu initial will open the menu, and the shortcut will get you to the menuitem.

Please note that if you do not explicitly set a shortcut, typing the initial of a menuitem will open the first corresponding one.

Looking for shortcut keys in my listbox rather than in a menu.

John, why don’t you start your own thread ? This has absolutely nothing to do with web !

The issue is still that keypressed doesn’t work when the focus is on a weblistbox.

A WebListbox simply does not get focus. Even when one clicks on it to select. By the way, it does not have a tab stop, which should give you a clue. Even with keyboard access enabled in the browser.

I just tested adding the KeyPressed event to the webPage. It fires quite fine… Even after displaying a Msgbox. You must have another problem.

And guess what, here is how you can get a focus ring around a web list box, and tab stop, and even specific keypressed event:

  • Put an Editfield under the listbox, at exactly the same top and left, with exactly the same size
  • Set the tab stop of the edit field where you want it in the tab order
  • Add Keypressed to the editfield

Now the tab will stop on the listbox and you will get Keypressed when the focus ring is around the listbox. Incidentally, the same tip can be used to put a focus ring and enable keyboard control for rectangles (Bob), image wells, whatever…

Which is correct - this is from the W3C recommendations for HTML 4.01:

You have to create the tabIndex attribute yourself for the . If this is possible for the built-in WebListbox I don’t know. But it is possible for a

wrapped by WebControlWrapper (as I did for the w2ui grid).

[quote=160580:@Eli Ott]Which is correct - this is from the W3C recommendations for HTML 4.01:

You have to create the tabIndex attribute yourself for the . If this is possible for the built-in WebListbox I don’t know. But it is possible for a

wrapped by WebControlWrapper (as I did for the w2ui grid).[/quote]

As far as the Xojo Weblistbox is concerned, being able to have a tab stop for it is one thing, then what one does with Keypresses is another thing. The logic of keyboard control is to be able to do the same thing with keys as what the mouse allows. In the case of the WebListbox, since there is no way to get ScrollPosition, when using up and down arrow keys to scroll, one never knows where to set the ScrollTo. If the user has scrolled with the mouse, setting an arbitrary ScrollTo will make the list jump, which is not very pretty.

2016 feb 4, still does not work.
Focused or not… no response
weblistbox needs a full developers revier
as webtextarea

What do you want to achieve ? Keypressed works just fine for the WebPage, which in most cases is sufficient, since WebListBox does not take data entry…

Keypressed works as expected in WebTextArea.

Really wish we could get keypressed in a web listbox to work. I use it for shortcut keys