Remove unused variable, fix #16310
Signed-off-by: Christian Rotzoll <ch.rotzoll@gmail.com>
This commit is contained in:
parent
5bebf3cbac
commit
3f417b0769
1 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri
|
||||||
// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string.
|
// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string.
|
||||||
func formatVirtualKey(key winterm.WORD, controlState winterm.DWORD, escapeSequence []byte) string {
|
func formatVirtualKey(key winterm.WORD, controlState winterm.DWORD, escapeSequence []byte) string {
|
||||||
shift, alt, control := getControlKeys(controlState)
|
shift, alt, control := getControlKeys(controlState)
|
||||||
modifier := getControlKeysModifier(shift, alt, control, false)
|
modifier := getControlKeysModifier(shift, alt, control)
|
||||||
|
|
||||||
if format, ok := arrowKeyMapPrefix[key]; ok {
|
if format, ok := arrowKeyMapPrefix[key]; ok {
|
||||||
return fmt.Sprintf(format, escapeSequence, modifier)
|
return fmt.Sprintf(format, escapeSequence, modifier)
|
||||||
|
@ -230,7 +230,7 @@ func getControlKeys(controlState winterm.DWORD) (shift, alt, control bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// getControlKeysModifier returns the ANSI modifier for the given combination of control keys.
|
// getControlKeysModifier returns the ANSI modifier for the given combination of control keys.
|
||||||
func getControlKeysModifier(shift, alt, control, meta bool) string {
|
func getControlKeysModifier(shift, alt, control bool) string {
|
||||||
if shift && alt && control {
|
if shift && alt && control {
|
||||||
return ansiterm.KEY_CONTROL_PARAM_8
|
return ansiterm.KEY_CONTROL_PARAM_8
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue