artemsen / xvi

Hex editor with ncurses based user interface
MIT License
18 stars 2 forks source link

key mappings improvements(?) #1

Open turlututututu opened 2 years ago

turlututututu commented 2 years ago

Hi!

First of all, thank for making this open source, this is the nicest curse based editor I have seen so far!

I think, we could make the key mapping a bit more intuitive for vi user (or user in general). Currently 'j' moves the cursor up while in vi-like-editor it moves the cursor down. Furthermore, the key 'F1' and 'F10' are usually used by the terminal to display help/option. Thus we could map the help (F1) and the exit (F10) to more default friendly key. That being it does stay true to the tradition of user being enable to quit vi xD

(P.S: I am willing to do the change, if they fit you)

artemsen commented 2 years ago

Hi turlututututu, Thank you very much for the feedback!! I've fixed j and k keys, but I am not sure about F1 and F10. I was inspired by the interface of such programs as Norton/Midnight Commander, so F1/F10 are mapped to help and exit. I would not want to change this behavior just because of the specific terminal (mine one, for example, doesn't override Fn keys). I believe it would be better to define own key mapping via xvi settings, but this feature is not implemented yet - this is a lot of work, which is not really needed given the popularity of the project. But if you'd like to participate, you're welcome! =)

(P.S. Thank you again for the first issue!)

turlututututu commented 2 years ago

Hi artemsen,

Thank you for your fix! :) Defining keymapping seems like a good idea but I have no idea how much work this will need! I would be happy to help though!