def __catch_key(self, return_to_browser=False):
        # Catch the pressed key
        self.pressedkey = self.get_key(self.term_window)
        if self.pressedkey == -1:
            return -1

        # Actions (available in the global hotkey dict)...
        logger.debug("Keypressed (code: {})".format(self.pressedkey))
        for hotkey in self._hotkeys:
            if self.pressedkey == ord(hotkey) and 'switch' in self._hotkeys[hotkey]:
                # Get the option name
                # Ex: disable_foo return foo
                #     enable_foo_bar return foo_bar
                option = '_'.join(self._hotkeys[hotkey]['switch'].split('_')[1:])
                if self._hotkeys[hotkey]['switch'].startswith('disable_'):
                    # disable_ switch
                    if getattr(self.args, self._hotkeys[hotkey]['switch']):
                        enable(self.args, option)
                    else:
                        disable(self.args, option)
                elif self._hotkeys[hotkey]['switch'].startswith('enable_'):
                    # enable_ switch
                    if getattr(self.args, self._hotkeys[hotkey]['switch']):
                        disable(self.args, option)
                    else:
                        enable(self.args, option)
                else:
                    # Others switchs options (with no enable_ or disable_)
                    setattr(
                        self.args,
                        self._hotkeys[hotkey]['switch'],
                        not getattr(self.args, self._hotkeys[hotkey]['switch']),
                    )
            if self.pressedkey == ord(hotkey) and 'sort_key' in self._hotkeys[hotkey]:
                glances_processes.set_sort_key(
                    self._hotkeys[hotkey]['sort_key'], self._hotkeys[hotkey]['sort_key'] == 'auto'
                )

        # Other actions...
        if self.pressedkey == ord('\n'):
            # 'ENTER' > Edit the process filter
            self.edit_filter = not self.edit_filter
        elif self.pressedkey == ord('4'):
            # '4' > Enable or disable quicklook
            self.args.full_quicklook = not self.args.full_quicklook
            if self.args.full_quicklook:
                self.enable_fullquicklook()
            else:
                self.disable_fullquicklook()
        elif self.pressedkey == ord('5'):
            # '5' > Enable or disable top menu
            self.args.disable_top = not self.args.disable_top
            if self.args.disable_top:
                self.disable_top()
            else:
                self.enable_top()
        elif self.pressedkey == ord('9'):
            # '9' > Theme from black to white and reverse
            self._init_colors()
        elif self.pressedkey == ord('e'):
            # 'e' > Enable/Disable process extended
            self.args.enable_process_extended = not self.args.enable_process_extended
            if not self.args.enable_process_extended:
                glances_processes.disable_extended()
            else:
                glances_processes.enable_extended()
        elif self.pressedkey == ord('E'):
            # 'E' > Erase the process filter
            glances_processes.process_filter = None
        elif self.pressedkey == ord('f'):
            # 'f' > Show/hide fs / folder stats
            self.args.disable_fs = not self.args.disable_fs
            self.args.disable_folders = not self.args.disable_folders
        elif self.pressedkey == ord('k'):
            # 'k' > Kill selected process (after confirmation)
            self.kill_process = not self.kill_process
        elif self.pressedkey == ord('w'):
            # 'w' > Delete finished warning logs
            glances_events.clean()
        elif self.pressedkey == ord('x'):
            # 'x' > Delete finished warning and critical logs
            glances_events.clean(critical=True)
        elif self.pressedkey == ord('z'):
            # 'z' > Enable or disable processes
            self.args.disable_process = not self.args.disable_process
            if self.args.disable_process:
                glances_processes.disable()
            else:
                glances_processes.enable()
        elif self.pressedkey == curses.KEY_LEFT:
            # "<" (left arrow) navigation through process sort
            next_sort = (self.loop_position() - 1) % len(self._sort_loop)
            glances_processes.set_sort_key(self._sort_loop[next_sort], False)
        elif self.pressedkey == curses.KEY_RIGHT:
            # ">" (right arrow) navigation through process sort
            next_sort = (self.loop_position() + 1) % len(self._sort_loop)
            glances_processes.set_sort_key(self._sort_loop[next_sort], False)
        elif self.pressedkey == curses.KEY_UP or self.pressedkey == 65:
            # 'UP' > Up in the server list
            if self.args.cursor_position > 0:
                self.args.cursor_position -= 1
        elif self.pressedkey == curses.KEY_DOWN or self.pressedkey == 66:
            # 'DOWN' > Down in the server list
            # if self.args.cursor_position < glances_processes.max_processes - 2:
            if self.args.cursor_position < glances_processes.processes_count:
                self.args.cursor_position += 1
        elif self.pressedkey == ord('\x1b') or self.pressedkey == ord('q'):
            # 'ESC'|'q' > Quit
            if return_to_browser:
                logger.info("Stop Glances client and return to the browser")
            else:
                logger.info("Stop Glances (keypressed: {})".format(self.pressedkey))
        elif self.pressedkey == curses.KEY_F5:
            # "F5" manual refresh requested
            pass

        # Return the key code
        return self.pressedkey