Extend uinput; replace open with os.open.