Static code for the special built-in key sequences
This commit is contained in:
parent
4840978273
commit
0fd6439f5a
|
@ -206,11 +206,11 @@ FKeyMap fkey[] =
|
||||||
// Fallback for TERM=ansi
|
// Fallback for TERM=ansi
|
||||||
{ fc::Fkey_end , CSI "K", "@7X"}, // end key
|
{ fc::Fkey_end , CSI "K", "@7X"}, // end key
|
||||||
// Keypad keys
|
// Keypad keys
|
||||||
{ fc::Fkey_enter , ESC "OM", "@8x"}, // enter key
|
{ fc::Fkey_enter , ESC "OM", "@8x"}, // enter key
|
||||||
{ fc::Fkey_slash , ESC "Oo", "KP1"}, // keypad slash
|
{ fc::Fkey_slash , ESC "Oo", "KP1"}, // keypad slash
|
||||||
{ fc::Fkey_asterisk , ESC "Oj", "KP2"}, // keypad asterisk
|
{ fc::Fkey_asterisk , ESC "Oj", "KP2"}, // keypad asterisk
|
||||||
{ fc::Fkey_minus_sign, ESC "Om", "KP3"}, // keypad minus sign
|
{ fc::Fkey_minus_sign, ESC "Om", "KP3"}, // keypad minus sign
|
||||||
{ fc::Fkey_plus_sign , ESC "Ok", "KP4"}, // keypad plus sign
|
{ fc::Fkey_plus_sign , ESC "Ok", "KP4"}, // keypad plus sign
|
||||||
{ 0 , nullptr, "\0" }
|
{ 0 , nullptr, "\0" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,9 @@ void FTermcap::termcapKeys (char*& buffer)
|
||||||
// Get termcap keys
|
// Get termcap keys
|
||||||
|
|
||||||
// Read termcap key sequences
|
// Read termcap key sequences
|
||||||
for (std::size_t i{0}; fc::fkey[i].tname[0] != 0; i++)
|
for ( std::size_t i{0};
|
||||||
|
fc::fkey[i].string == nullptr && fc::fkey[i].tname[0] != 0;
|
||||||
|
i++ )
|
||||||
fc::fkey[i].string = tgetstr(C_STR(fc::fkey[i].tname), &buffer);
|
fc::fkey[i].string = tgetstr(C_STR(fc::fkey[i].tname), &buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue