Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
0c319f8b
Commit
0c319f8b
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: put the case labels (the keycodes) in a more sensible order
parent
4fcc7601
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+40
-39
src/winio.c
with
40 additions
and
39 deletions
+40
-39
src/winio.c
View file @
0c319f8b
...
...
@@ -499,24 +499,6 @@ int parse_kbinput(WINDOW *win)
if
(
retval
!=
ERR
)
{
switch
(
retval
)
{
case
NANO_CONTROL_8
:
retval
=
ISSET
(
REBIND_DELETE
)
?
sc_seq_or
(
do_delete
,
0
)
:
sc_seq_or
(
do_backspace
,
0
);
break
;
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
case
KEY_SDOWN
:
#endif
case
KEY_DOWN
:
retval
=
sc_seq_or
(
do_down_void
,
*
kbinput
);
break
;
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
case
KEY_SUP
:
#endif
case
KEY_UP
:
retval
=
sc_seq_or
(
do_up_void
,
*
kbinput
);
break
;
#ifdef KEY_SLEFT
/* Slang doesn't support KEY_SLEFT. */
case
KEY_SLEFT
:
...
...
@@ -531,6 +513,20 @@ int parse_kbinput(WINDOW *win)
case
KEY_RIGHT
:
retval
=
sc_seq_or
(
do_right
,
*
kbinput
);
break
;
#ifdef KEY_SUP
/* ncurses and Slang don't support KEY_SUP. */
case
KEY_SUP
:
#endif
case
KEY_UP
:
retval
=
sc_seq_or
(
do_up_void
,
*
kbinput
);
break
;
#ifdef KEY_SDOWN
/* ncurses and Slang don't support KEY_SDOWN. */
case
KEY_SDOWN
:
#endif
case
KEY_DOWN
:
retval
=
sc_seq_or
(
do_down_void
,
*
kbinput
);
break
;
#ifdef KEY_SHOME
/* HP-UX 10-11 and Slang don't support KEY_SHOME. */
case
KEY_SHOME
:
...
...
@@ -541,9 +537,35 @@ int parse_kbinput(WINDOW *win)
case
KEY_A1
:
/* Home (7) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_home
,
*
kbinput
);
break
;
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case
KEY_SEND
:
#endif
#ifdef KEY_END
case
KEY_END
:
#endif
case
KEY_C1
:
/* End (1) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_end
,
*
kbinput
);
break
;
case
KEY_PPAGE
:
case
KEY_A3
:
/* PageUp (9) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_page_up
,
*
kbinput
);
break
;
case
KEY_NPAGE
:
case
KEY_C3
:
/* PageDown (4) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_page_down
,
*
kbinput
);
break
;
case
KEY_ENTER
:
retval
=
sc_seq_or
(
do_enter
,
*
kbinput
);
break
;
case
KEY_BACKSPACE
:
retval
=
sc_seq_or
(
do_backspace
,
*
kbinput
);
break
;
case
NANO_CONTROL_8
:
retval
=
ISSET
(
REBIND_DELETE
)
?
sc_seq_or
(
do_delete
,
0
)
:
sc_seq_or
(
do_backspace
,
0
);
break
;
#ifdef KEY_SDC
/* Slang doesn't support KEY_SDC. */
case
KEY_SDC
:
...
...
@@ -559,27 +581,6 @@ int parse_kbinput(WINDOW *win)
retval
=
sc_seq_or
(
do_insertfile_void
,
*
kbinput
);
break
;
#endif
case
KEY_NPAGE
:
case
KEY_C3
:
/* PageDown (4) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_page_down
,
*
kbinput
);
break
;
case
KEY_PPAGE
:
case
KEY_A3
:
/* PageUp (9) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_page_up
,
*
kbinput
);
break
;
case
KEY_ENTER
:
retval
=
sc_seq_or
(
do_enter
,
*
kbinput
);
break
;
#ifdef KEY_SEND
/* HP-UX 10-11 and Slang don't support KEY_SEND. */
case
KEY_SEND
:
#endif
#ifdef KEY_END
case
KEY_END
:
#endif
case
KEY_C1
:
/* End (1) on keypad with NumLock off. */
retval
=
sc_seq_or
(
do_end
,
*
kbinput
);
break
;
#ifdef KEY_SBEG
/* Slang doesn't support KEY_SBEG. */
case
KEY_SBEG
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help