def process_input()

in src/pathpicker/screen_control.py [0:0]


    def process_input(self, key: str) -> None:
        if key in ["k", "UP"]:
            self.move_index(-1)
        elif key in ["j", "DOWN"]:
            self.move_index(1)
        elif key == "x":
            self.toggle_x_mode()
        elif key == "c":
            self.begin_enter_command()
        elif key in [" ", "NPAGE"]:
            self.page_down()
        elif key in ["b", "PPAGE"]:
            self.page_up()
        elif key in ["g", "HOME"]:
            self.jump_to_index(0)
        elif (key == "G" and not self.mode == X_MODE) or key == "END":
            self.jump_to_index(self.num_matches - 1)
        elif key == "d":
            self.describe_file()
        elif key == "f":
            self.toggle_select()
        elif key == "F":
            self.toggle_select()
            self.move_index(1)
        elif key == "A" and not self.mode == X_MODE:
            self.toggle_select_all()
        elif key == "ENTER" and (
            not self.flags.get_all_input() or self.flags.get_preset_command()
        ):
            # it does not make sense to process an 'ENTER' keypress if we're in
            # the allInput mode and there is not a preset command.
            self.on_enter()
        elif key == "q":
            output.output_nothing()
            # this will get the appropriate selection and save it to a file for
            # reuse before exiting the program
            self.get_paths_to_use()
            self.curses_api.exit()
        elif self.mode == X_MODE and key in LABELS:
            self.select_x_mode(key)

        for bound_key, command in self.key_bindings:
            if key == bound_key:
                self.execute_preconfigured_command(command)