Commit 9d08362 1 parent e15db71 commit 9d08362 Copy full SHA for 9d08362
File tree 3 files changed +12
-26
lines changed
3 files changed +12
-26
lines changed Original file line number Diff line number Diff line change 1
- // +build !windows
2
-
3
1
package promptui
4
2
5
3
import "github.com/chzyer/readline"
10
8
// KeyEnter is the default key for submission/selection.
11
9
KeyEnter rune = readline .CharEnter
12
10
13
- // KeyBackspace is the default key for deleting input text.
14
- KeyBackspace rune = readline .CharBackspace
15
-
16
11
// KeyPrev is the default key to go up during selection.
17
12
KeyPrev rune = readline .CharPrev
18
13
KeyPrevDisplay = "↑"
Original file line number Diff line number Diff line change
1
+ // +build !windows
2
+
3
+ package promptui
4
+
5
+ import "github.com/chzyer/readline"
6
+
7
+ var (
8
+ // KeyBackspace is the default key for deleting input text.
9
+ KeyBackspace rune = readline .CharBackspace
10
+ )
Original file line number Diff line number Diff line change
1
+ // +build windows
2
+
1
3
package promptui
2
4
3
5
// source: https://msdn.microsoft.com/en-us/library/aa243025(v=vs.60).aspx
4
6
5
7
var (
6
- // KeyEnter is the default key for submission/selection inside a command line prompt.
7
- KeyEnter rune = 13
8
-
9
8
// KeyBackspace is the default key for deleting input text inside a command line prompt.
10
9
KeyBackspace rune = 8
11
-
12
- // FIXME: keys below are not triggered by readline, not working on Windows
13
-
14
- // KeyPrev is the default key to go up during selection inside a command line prompt.
15
- KeyPrev rune = 38
16
- KeyPrevDisplay = "k"
17
-
18
- // KeyNext is the default key to go down during selection inside a command line prompt.
19
- KeyNext rune = 40
20
- KeyNextDisplay = "j"
21
-
22
- // KeyBackward is the default key to page up during selection inside a command line prompt.
23
- KeyBackward rune = 37
24
- KeyBackwardDisplay = "h"
25
-
26
- // KeyForward is the default key to page down during selection inside a command line prompt.
27
- KeyForward rune = 39
28
- KeyForwardDisplay = "l"
29
10
)
You can’t perform that action at this time.
0 commit comments