WIP rewrite power key handling