awesome-gocui / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
350 stars 39 forks source link

Keybindings for Ctrl, Shift + Arrow keys, Backspace #54

Closed curusarn closed 4 years ago

curusarn commented 4 years ago

Describe the feature you'd like I would like to be able to bind functions to the following combinations:

Context The Alt key seems to be the only available modifier (gocui.ModAlt) and some Ctrl key combinations are realized as special keys (gocui.KeyCtrlC). The Shift key combinations don't seem to be bindable at all.

Is there a reason why is there a different interface for different modifiers? Would it be possible to unify this? Is this connected to some underlying issue with termbox?

Thank you for your work

mjarkk commented 4 years ago

This isn't possible due to termbox :(,
Our keybindings are a direct copy of termbox's and thus we can't do a lot to fix it.

Because of this and other issues with termbox i've openend a pr to switch to tcell here https://github.com/awesome-gocui/gocui/pull/45
Tcell is an alternative to termbox and fixes a lot of problems with termbox that are currently impossible to solve.