#36

feat: auto-disable keyboard when remote controller is connected

Openxvimntwants to merge intofrom
  • Add NX_AUTO_DISABLE_KEYBOARD support in nxhost
  • Allow remote controller to automatically claim Player 1 when enabled
  • Restore keyboard controls automatically if remote controller disconnects
  • Add UI toggle in Launcher settings under Remote controllers

Activity

2
c22dev22d ago

hi ! great pr on a point I couldn't wrap my head around. however, there is a few issues with it :

  • its on by default, meaning if one person plays on a keyboard and another one on a phone it breaks (maybe player 1 wanna be the keyboard?) ; could you default it to false?
  • it breaks TV/extra native mode (own) ; when own is true the keyboard has its own slot, but with a phone connected key_slot becomes None and that slot gets no input. gating it with !own && ... fixes it
  • its too broad (has_remote is true if a phone is in any slot), and a phone on P3 would also kill the keyboard. maybe check self.phones[self.home].is_some()
  • it reads the env var on every poll, would you mind caching it with a LazyLock like motion_enabled()?