tvOS Detecting Keyboard Type

Hi, i have to implement a grid layout for UISearchController that have different number of columns depending on users settings of keyboard (Inline or grid). At this point my layout which is on default prepared for inline keyboard, when grid appears shrinks making cells smaller. Youtube app for tvOS have this sorted out, but i struggle. Does anyone have any idea what to use?

Did you find any solution regarding keyboard type (returning if its grid or linear)?

tvOS Detecting Keyboard Type
 
 
Q