# compose

Andy Himberger

10/24/2023, 11:56 PM
How to override key events in a TextField that it natively handles?
I am trying to override a few events on a TextField, the main one is that we have a multi-line enabled text input field but we want tab to still move focus to the next item... There was an issue before that tab was always inserting tab characters, which was fixed in the TextField to not insert tabs when its single line... I tried adding an onKeyEvent modifier passed into the TextField, but I only get key events that are not handled by the textfield itself, given the order of modifiers being applied internal in the CoreTextField. It also doesn't help to put something around the textfield handling key events since the inner most thing gets the first chance to handle it. I'm wondering if there is another mechanism I'm missing... right now the only workaround I've been able to come up with is to look to see if a tab character was inserted into the textvalue data, remove it and invoke our tab behavior (

Zach Klippenstein (he/him) [MOD]

10/25/2023, 5:10 PM
Did you try

Andy Himberger

10/26/2023, 7:18 AM
oh thanks! I hadn't used that one before, that seems to work