aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-16 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-16 20:20:20 +0200
commit14329a6d21272feb06378a6ae39e12c8be4df5e7 (patch)
treec96863a880ba36dc9e0294ec1b1833b16d61ab06 /src/i_events.go
parentqwe (diff)
downloadhardflip-14329a6d21272feb06378a6ae39e12c8be4df5e7.tar.gz
hardflip-14329a6d21272feb06378a6ae39e12c8be4df5e7.tar.bz2
hardflip-14329a6d21272feb06378a6ae39e12c8be4df5e7.tar.xz
hardflip-14329a6d21272feb06378a6ae39e12c8be4df5e7.tar.zst
hardflip-14329a6d21272feb06378a6ae39e12c8be4df5e7.zip
cool
Diffstat (limited to '')
-rw-r--r--src/i_events.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/i_events.go b/src/i_events.go
index 268fda5..75d9941 100644
--- a/src/i_events.go
+++ b/src/i_events.go
@@ -582,6 +582,9 @@ func i_events(data *HardData) {
if data.insert.Protocol == PROTOCOL_RDP &&
data.ui.insert_sel == INS_PROTOCOL {
data.ui.insert_sel = INS_RDP_HOST
+ } else if data.insert.Protocol == PROTOCOL_CMD &&
+ data.ui.insert_sel == INS_PROTOCOL {
+ data.ui.insert_sel = INS_CMD_CMD
} else if data.ui.insert_sel < data.ui.insert_sel_max {
data.ui.insert_sel += 1
}
@@ -590,6 +593,9 @@ func i_events(data *HardData) {
if data.insert.Protocol == PROTOCOL_RDP &&
data.ui.insert_sel == INS_RDP_HOST {
data.ui.insert_sel = INS_PROTOCOL
+ } else if data.insert.Protocol == PROTOCOL_CMD &&
+ data.ui.insert_sel == INS_CMD_CMD {
+ data.ui.insert_sel = INS_PROTOCOL
} else if data.ui.insert_sel > INS_PROTOCOL {
data.ui.insert_sel -= 1
}
@@ -643,6 +649,8 @@ func i_events(data *HardData) {
break
case INS_RDP_QUALITY: break
case INS_RDP_DRIVE + len(data.insert.Drive): break
+ case INS_CMD_CMD: ui.buff = data.insert.Host
+ case INS_CMD_SHELL: ui.buff = data.insert.Shell[0]
case INS_SSH_NOTE,
INS_RDP_NOTE + len(data.insert.Drive):
ui.buff = data.insert.Note
@@ -786,7 +794,9 @@ func i_events(data *HardData) {
INS_RDP_USER,
INS_RDP_PASS,
INS_RDP_FILE,
- INS_RDP_NOTE + len(data.insert.Drive):
+ INS_RDP_NOTE + len(data.insert.Drive),
+ INS_CMD_CMD,
+ INS_CMD_SHELL:
if event.Key() == tcell.KeyEnter {
switch data.ui.insert_sel {
case INS_SSH_HOST,
@@ -825,6 +835,10 @@ func i_events(data *HardData) {
data.insert.Domain = ui.buff
case INS_RDP_FILE:
data.insert.RDPFile = ui.buff
+ case INS_CMD_CMD:
+ data.insert.Host = ui.buff
+ case INS_CMD_SHELL:
+ data.insert.Shell[0] = ui.buff
case INS_SSH_NOTE,
INS_RDP_NOTE + len(data.insert.Drive):
data.insert.Note = ui.buff