Add associated function to physical keyboard
The function keys (HOME/BACK/DPAD...) may not always be virtual keys,
so we need provide a static input mapping mechanism to the physical
keyboard to make sure key events can dispatch to the corresponding
display.
- Find the associated viewport for keyboard when display info changed
and has an associated display port specified.
- Should disable the input device when an associated port specified but
no display viewport found.
- Changed getAssociatedDisplay -> getAssociatedDisplayId.
- Add test cases to test input device and keyboard associated mapping.
Bug: 137693244
Test: atest -a libinput_tests inputflinger_tests
Change-Id: If218f55645a78a4b50cec92b35b0dbae641dd1a1
3 files changed