dots-hyprland icon indicating copy to clipboard operation
dots-hyprland copied to clipboard

Add Emacs navigation & editing in search box and overview search (close #255)

Open locutus3009 opened this issue 3 weeks ago • 8 comments

Describe your changes

Add Emacs navigation in search results in overview's SearchWidget

Closes #255

Is it ready? Questions/feedback needed?

This CL is ready

  • [x] Ctrl+N: Select next item (same as Down arrow key).
  • [x] Ctrl+P: Select previous item (same as Up arrow key).
  • [x] Ctrl+F: Cursor move forward (same as Right arrow key).
  • [x] Ctrl+B: Cursor move backward (same as Left arrow key).
  • [x] Ctrl+A: Cursor moves to begin of line (same as Home key).
  • [x] Ctrl+E: Cursor moves to end of line (same as End key).
  • [x] Ctrl+U: Deletes from "begin of line" to cursor. (current keybinding deletes the whole line)
  • [x] Ctrl+K: Deletes from cursor to "end of line".
  • [x] Ctrl+D: Forward deletion.

locutus3009 avatar Nov 10 '25 14:11 locutus3009

Is it possible to implement #255 ?

clsty avatar Nov 10 '25 15:11 clsty

I think it is possible, let me try it. I will turn this to the draft

locutus3009 avatar Nov 10 '25 15:11 locutus3009

Done

locutus3009 avatar Nov 10 '25 17:11 locutus3009

Mostly works. I'll trust the binds are correct because I do not use Emacs

@end-4 I should clearify that Emacs uses them but it's not Emacs-like keybinding but more general thing that widely adopted just as described in the examples in #255, including shells, editors, launchers...

i.e. AFAIK it's probably Linux style, not just Emacs style. As for Ctrl-A it's windows-style.

clsty avatar Nov 13 '25 22:11 clsty

It's probably clearer to call it Emacs style. Graphical programs on Linux use ctrl a for select all, so calling it "Linux style" would be too broad imo

end-4 avatar Nov 13 '25 22:11 end-4

It's probably clearer to call it Emacs style. Graphical programs on Linux use ctrl a for select all, so calling it "Linux style" would be too broad imo

As described in #255, Emacs does not use Ctrl-U to clear the line by default. That's one reason why it's not suitable to call it Emacs style.

~~I guess something like Linux-tradition style is more suitable.~~

Maybe shell or CLI or Rofi style. Linux-tradition sounds like something outdated which is not true for those keybinds.

clsty avatar Nov 13 '25 23:11 clsty

Actually, since only ctrl+a is problematic here, we could just make the config option say something like "ctrlAAsHome" with description "ctrl+a to move cursor to beginning"

And we simply not mention emacs or any other program at all

end-4 avatar Nov 14 '25 08:11 end-4

Ok, let me fix your suggestions. Today I don't have much time on it, I'll try to access these comments on Weekend.

locutus3009 avatar Nov 14 '25 09:11 locutus3009