Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
a4985354
Commit
a4985354
authored
Aug 24, 2018
by
Hisham Muhammad
Browse files
Change to previous screen using Shift-Tab
parent
28a5859f
Changes
3
Show whitespace changes
Inline
Side-by-side
Action.c
View file @
a4985354
...
@@ -305,6 +305,16 @@ static Htop_Reaction actionNextScreen(State* st) {
...
@@ -305,6 +305,16 @@ static Htop_Reaction actionNextScreen(State* st) {
return
HTOP_REFRESH
;
return
HTOP_REFRESH
;
}
}
static
Htop_Reaction
actionPrevScreen
(
State
*
st
)
{
Settings
*
settings
=
st
->
settings
;
settings
->
ssIndex
--
;
if
(
settings
->
ssIndex
==
-
1
)
{
settings
->
ssIndex
=
settings
->
nScreens
-
1
;
}
settings
->
ss
=
settings
->
screens
[
settings
->
ssIndex
];
return
HTOP_REFRESH
;
}
static
Htop_Reaction
actionSetAffinity
(
State
*
st
)
{
static
Htop_Reaction
actionSetAffinity
(
State
*
st
)
{
if
(
st
->
pl
->
cpuCount
==
1
)
if
(
st
->
pl
->
cpuCount
==
1
)
return
HTOP_OK
;
return
HTOP_OK
;
...
@@ -610,5 +620,6 @@ void Action_setBindings(Htop_Action* keys) {
...
@@ -610,5 +620,6 @@ void Action_setBindings(Htop_Action* keys) {
keys
[
'c'
]
=
actionTagAllChildren
;
keys
[
'c'
]
=
actionTagAllChildren
;
keys
[
'e'
]
=
actionShowEnvScreen
;
keys
[
'e'
]
=
actionShowEnvScreen
;
keys
[
'\t'
]
=
actionNextScreen
;
keys
[
'\t'
]
=
actionNextScreen
;
keys
[
KEY_SHIFT_TAB
]
=
actionPrevScreen
;
}
}
CRT.c
View file @
a4985354
...
@@ -42,6 +42,7 @@ in the source distribution for its full text.
...
@@ -42,6 +42,7 @@ in the source distribution for its full text.
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_RECLICK KEY_F(22)
#define KEY_RECLICK KEY_F(22)
#define KEY_SHIFT_TAB KEY_F(23)
//#link curses
//#link curses
...
@@ -646,12 +647,16 @@ void CRT_init(int delay, int colorScheme) {
...
@@ -646,12 +647,16 @@ void CRT_init(int delay, int colorScheme) {
define_key
(
"
\033
[13~"
,
KEY_F
(
3
));
define_key
(
"
\033
[13~"
,
KEY_F
(
3
));
define_key
(
"
\033
[14~"
,
KEY_F
(
4
));
define_key
(
"
\033
[14~"
,
KEY_F
(
4
));
define_key
(
"
\033
[17;2~"
,
KEY_F
(
18
));
define_key
(
"
\033
[17;2~"
,
KEY_F
(
18
));
define_key
(
"
\033
[Z"
,
KEY_SHIFT_TAB
);
char
sequence
[
3
]
=
"
\033
a"
;
char
sequence
[
3
]
=
"
\033
a"
;
for
(
char
c
=
'a'
;
c
<=
'z'
;
c
++
)
{
for
(
char
c
=
'a'
;
c
<=
'z'
;
c
++
)
{
sequence
[
1
]
=
c
;
sequence
[
1
]
=
c
;
define_key
(
sequence
,
KEY_ALT
(
'A'
+
(
c
-
'a'
)));
define_key
(
sequence
,
KEY_ALT
(
'A'
+
(
c
-
'a'
)));
}
}
}
}
if
(
String_startsWith
(
CRT_termType
,
"rxvt"
))
{
define_key
(
"
\033
[Z"
,
KEY_SHIFT_TAB
);
}
#ifndef DEBUG
#ifndef DEBUG
signal
(
11
,
CRT_handleSIGSEGV
);
signal
(
11
,
CRT_handleSIGSEGV
);
#endif
#endif
...
...
CRT.h
View file @
a4985354
...
@@ -31,6 +31,7 @@ in the source distribution for its full text.
...
@@ -31,6 +31,7 @@ in the source distribution for its full text.
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_RECLICK KEY_F(22)
#define KEY_RECLICK KEY_F(22)
#define KEY_SHIFT_TAB KEY_F(23)
//#link curses
//#link curses
...
...
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