You have missed the elephant in the room: Vi(m) is a modal editor while the GtkTextView
widget is rather obviously not.
Non-modal editors or textfield widgets like the one you are playing with have their own way of handling the alpha-numerical keys of your keyboard: modifier keys.
Either
- you hit a key to enter some kind of mode where you can hit
hjkl
without inserting them in your text
or
- you press
hjkl
plus a modifier key.
Those are basically your only alternatives.
Using hjkl
for cursor movement only makes sense when the user is in a mode that prevents him/her to insert what he/she types. It may "work" in GtkTreeView
or in other contexts where the user is not expected to type text, though.
So… I'm not sure you really gave much thought to your problem.