Insert gets Question mark

Not sure why this is happening (dumb), but in a new app (actually a template I made for myself), I added a Listbox, and put some code in the KeyDown event. However, when I run the app, and the List has focus, KeyDown doesn’t get fired when I hit Insert - instead, I get this question mark. If I click (empty) Listbox, the question mark goes away.

Why is this?

Can you post the relevant code?

I wish I could, the template is rather large with lots of external files - too complicated for this (probably more basic) question.

There isn’t any upstream Keydown events I know being captured, and the Menu is the basic normal thing. I even set MenuBar to None and it still does it.

I tried creating a project from scratch, and it doesn’t do it - it fires normally.

The question mark is a graphical thing, like something that is waiting for Bubble Help or something. In lieu of checking the code directly, do you know what could be getting the Keydown event before the List does?

(BTW, if you want to do a Remote Session with Teamviewer, feel free to do the Chat at to alert me and we can do that.)

Would a breakpoint on each line of code in the entire application that updates the Listbox not help in this case?

I’m on with him now. The problem is that the mouse pointer is turing into “?” on Insert. The mystery is, why does it consistently happen for me too in a test project on my end AND the test project on his end, but it doesn’t happen for him when he tries in his test project.

So we are talking MOUSECURSOR, not an encoding issue (black diamond with ?)

Maybe then place a breakpoint on all the “KeyXyz” events in the entire application.

Is the “context help mouse pointer” (if there is such a thing) getting activated somehow with Insert key?

Must be, but it gets odder. When I transfer HIS test project to my machine, I can’t reproduce the problem.

What OS? This post discusses it happening on a Mac (with a Windows or extended keyboard)…the Help (or Insert) key changes the cursor into a question mark. I don’t have a keyboard like that to test, though.

As indicated by Bill, it seems one could try and see if the fault is outside Xojo application. Based on local/personal knowledge, if any application has support for “context help mouse pointer” then Insert key should also cause similar change of mouse pointer in that application.

OK, I’m the OP… (first thanks to Kem for taking time to Teamviewer, Kem rocks, and remote sessions rock)

I think it boils down to using outer-Mongolia (meaning anything OTHER than Apple-created) keyboards with the Mac.

Using test projects, simply putting a Listbox on a window and typing “break” in Keydown gets the ? for me, using my WIndows keyboard running into my MBP. But if I use the MBP keyboard, well… the question becomes - what is Ins? I googled and really no one knows what Ins is on a MBP anyway.

(If anyone knows how to generate a Ascii 5 on a MBP keyboard - remapping or whatever, let me know.)

So really the solution is that Insert is more a Windows concept than a Mac one. My original point was to Insert items in a Listbox by pressing Ins and deleting them by selecting the entries and pressing Del. That was the way it worked in my head, and in Windows it’s common (I guess). But looks like Steve Jobs just told me how the world is supposed to work so now I will put on my Lemming Suit (just my warmup suit, or my pajamas as Vector would say) and forget about using Ins (Insert) for this purpose.

Sometimes the best solution IS avoidance. Not always, but this time, yes. Again, thanks Kem for your time and attacking this head on.

So, just to conclude constructively - what is the usual practice for having a Listbox and adding items to it? I know dragging into it is fun, but whats more common? A button with “Add” next to it? OK, sure, but isn’t that bad for screen real estate? This is why I like Insert in the first place - seemingly more simply. But perhaps Keyboard real estate won over Screen real estate.

  • and - buttons beneath the list, and you can tie them to the = and - keys (or command-= and command- -, I guess).

This thread says FN+Return on the MBP keyboard but not external ones works.

I’m probably avoiding the real meat of the topic, but fn+return on my MBP - stock - does not give me Asc 5 (what I understand as Ins) in KeyDown but Asc 3. Thus it is “not” Ins.

Which was sort of my point - Ins isn’t really recognized by Apple. So it can be anything you want it to be, and thus it’s sort of a app-specific thing, which is why when you google it you get lots of app-specific solutions. And app-specific means the common person is making system decisions, which the IRS - I mean the federal government - no, I mean your local policeman - no, I mean Apple =) will come down on your like fire. =)

I’m being silly, but Ins isn’t the way Apple users work, at least nowadays, so Ins is best left “uninserted” and not used.

For me, I use a Windows keyboard since I use a multi KVM system - 4 computers switchable, killer setup - and Kem was using one too, and we’ve got that GREAT BIG INSERT key in the 6-key area (INS-DEL-HOME-END-PAGEUP-PAGEDOWN) and it entices us to USE IT!!! But alas, not in Appleland, unless you want a app-specific solution, in which the Law of Diminishing Returns appears in that you have to teach this to the end-user, and it usually won’t even work because you don’t know what keyboard he’s using and you ahve to teach him how to map the key-sequence… uggggg grrrr … no.

You don’t need insert in the Apple world (or any graphics world, for that matter) since users position the edit cursor with a mouse click.

The Ins key goes back to the text days when you positioned the cursor within your document and then used the Ins key to toggle between inserting new text or overtyping existing text. Now, if you want to overtype something, you select it with the mouse (click - drag - release) and simply type.

That key should have been removed back in the Windows 3.1 days when we became far less dependent on the MS DOS text modes.

BTW, using an Apple keyboard in a Windows world results in the Fn key actually being used as Ins. I use this in my setups because I’ve really grown to love the feel of the Apple extended keyboard.

INS and DEL have grown out of the text relationship when GUI came into being, where they can mean INS=“adding” and DEL="deleting, commonly when selected things are on a screen or a list. I find use of INS innovative, and kind of surprised that Apple didn’t measure up to Windows in that regard, also DEL as well. DEL and BACKSPACE are the same key in the Apple world, perhaps that’s more simple, but it’s nice in the Win world to have them separated, IMHO.

Actually, Apple does support Del and Backspace as two different keys. On the extended keyboard, they are both there. On the MBP keyboard or shorty keyboard, the Backspace becomes Del if you hold the Fn key while hitting Backspace.


But that is not the code of the Windows keyboard Insert key, which apparently does not generate a key in keydown or AsyncKeyDown.

There is apparently no method in Xojo to detect the Insert key, unlike other special keys such as Alt, etc. Could be an issue not so much on Mac as on Windows.