I have a Lenovo ThinkPad X201 Tablet with buttons on the screen bezel. These buttons are there to rotate or invert the display in Linux (Ubuntu 20.04) or lock the screen. Currently I have successfully configured the buttons to do this. However, they are part of the same keyboard input device /dev/input/event3.
This means that the keyboard is disabled when the lid is closed. However, it also means that when the X201 Tablet is in tablet mode, it disabled the keyboard. Therefore when I enter tablet mode, I cannot use the bezel buttons even though they are still reachable and meant to be used in tablet mode.
I am certain, that it is able to tell the difference from being in tablet mode or actually being closed, since the screen doesn't turn off in tablet mode, but it does when when closing it like a normal laptop.
Is there a way to prevent Linux from disabling the keyboard, when I close the lid or maybe even only when in tablet mode? -and if that is possible, would it also be possible to only enable the four bezel buttons and disable the rest of the keyboard?