Add paste on Ctrl+V for login. Fixes
@@ -2,6 +2,7 @@ package ui
import (
"github.com/Bios-Marcel/tview"
+ "github.com/atotto/clipboard"
"github.com/gdamore/tcell"
"os"
)
@@ -65,6 +66,14 @@ func NewLogin(app *tview.Application, configDir string) *Login {
return nil
}
+ if event.Key() == tcell.KeyCtrlV {
+ content, clipError := clipboard.ReadAll()
+ if clipError != nil {
+ panic(clipError)
+ }
+ login.tokenInput.Insert(content)
+ }
+
if event.Key() == tcell.KeyCtrlR {
if login.tokenInputMasked {
login.tokenInputMasked = false
