rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.71k stars 363 forks source link

Create rz-shell like subsystem for visual modes (handling hotkeys) #3164

Open XVilka opened 2 years ago

XVilka commented 2 years ago

Currently, the code of all visual modes is a bit messy due to giant switches depending on what keys the user presses. Similarly to how rzshell was introduced with commands description in YAML and system of handlers and corresponding API, we could create something similar for visual modes:

  1. System of defining key and handler
  2. Every handler should receive the state structure
  3. No need to define it in YAML for now
thestr4ng3r commented 2 years ago

The overall idea sounds good, but we should also be careful not to overengineer it, e.g. I agree that for visual we should not use yaml.