Add q to application quit

This commit is contained in:
Kevin Cotugno 2017-12-27 15:47:43 -08:00
parent 7cfb59aeb9
commit 3bf3645cd3
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
package exhibit
const (
CtrC = Event(3)
EventCtrC = Event(3)
Eventq = Event(113)
)
type Event byte

View File

@ -105,7 +105,7 @@ func main() {
go func() {
for e := range terminal.Event {
if e == exhibit.CtrC {
if e == exhibit.EventCtrC || e == exhibit.Eventq {
conn.WriteMessage(websocket.CloseMessage,
websocket.FormatCloseMessage(websocket.
CloseNormalClosure, ""))