ENH: Add support for HOME and END keys. Also fix Bug #666 - In CCMake when deleting something, it does not stop at the beginning of line
This commit is contained in:
parent
0986b42761
commit
685be51a0e
|
@ -162,19 +162,22 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
|
||||||
{
|
{
|
||||||
form_driver(form, REQ_CLR_EOL);
|
form_driver(form, REQ_CLR_EOL);
|
||||||
}
|
}
|
||||||
else if ( key == ctrl('a') )
|
else if ( key == ctrl('a') || key == KEY_HOME )
|
||||||
{
|
{
|
||||||
form_driver(form, REQ_BEG_FIELD);
|
form_driver(form, REQ_BEG_FIELD);
|
||||||
}
|
}
|
||||||
else if ( key == ctrl('e') )
|
else if ( key == ctrl('e') || key == KEY_END )
|
||||||
{
|
{
|
||||||
form_driver(form, REQ_END_FIELD);
|
form_driver(form, REQ_END_FIELD);
|
||||||
}
|
}
|
||||||
else if ( key == ctrl('d') || key == 127 ||
|
else if ( key == ctrl('d') || key == 127 ||
|
||||||
key == KEY_BACKSPACE || key == KEY_DC )
|
key == KEY_BACKSPACE || key == KEY_DC )
|
||||||
{
|
{
|
||||||
|
if ( form->curcol > 0 )
|
||||||
|
{
|
||||||
form_driver(form, REQ_DEL_PREV);
|
form_driver(form, REQ_DEL_PREV);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->OnType(key, fm, w);
|
this->OnType(key, fm, w);
|
||||||
|
|
Loading…
Reference in New Issue