CAPI tab order issues for :accepts-focus-p elements

"John DeSoi (as john at desoi dot dev)" <[email protected]> Wed, 24 Jun 2026 02:20:29 +0000
Newsgroups gmane.lisp.lispworks.general
Message-ID <0100019ef76dcfd6-d5bc08b6-cae0-4b9c-9752-2ddceda3d97c-000000@email.amazonses.com>
On macOS I spent hours trying to figure out why using the tab key to move to the next element did not always work correctly. On some interfaces after tabbing to the last input field, hitting the tab key again stayed in the current field rather than cycling back to the first. I finally realized this occurs on tab-layouts and switchable-layouts because CAPI is keeping elements that are not included on the visible child in the tab order. 

For example, I had a list panel on the first pane of a switchable child and some text fields on the second. Hitting tab when the last field has focus, does nothing. I dug into the Cocoa representation of the interface and discovered the last field "nextKeyView" refers to the list panel which is not visible. I tried using "setNextKeyView" to fix it, but no luck.

The problem is illustrated in the CAPI docking-layout.lisp example - CL-USER::RUN-DOCKING-LAYOUT-WITH-STATE. If the first tab is selected, the tab key moves back and forth between the two list panels. This does not work if you select the second tab.

Any know work-arounds for this? 

Is there a way in CAPI to control the tab order of elements accepting focus? 

Thanks,

John DeSoi, Ph.D.



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html