Skip to content

Commit

Permalink
added HOME and END support, improved PAGE UP/DOWN.
Browse files Browse the repository at this point in the history
  • Loading branch information
eteeselink authored and kusma committed Mar 19, 2010
1 parent f8301d6 commit 9f1bb50
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions editor/trackview.cpp
Expand Up @@ -855,7 +855,7 @@ LRESULT TrackView::onKeyDown(UINT keyCode, UINT /*flags*/)
if (GetKeyState(VK_SHIFT) < 0) bias = 100.0f;
editBiasValue(bias);
}
else setEditRow(editRow - windowRows / 2);
else setEditRow(editRow - 0x10);
break;

case VK_NEXT:
Expand All @@ -865,7 +865,43 @@ LRESULT TrackView::onKeyDown(UINT keyCode, UINT /*flags*/)
if (GetKeyState(VK_SHIFT) < 0) bias = 100.0f;
editBiasValue(-bias);
}
else setEditRow(editRow + windowRows / 2);
else setEditRow(editRow + 0x10);
break;
case VK_HOME:
if (GetKeyState(VK_CONTROL) < 0)
{
setEditRow(0);
}
else
{
int remainder = editRow % 0x80;
if(remainder)
{
setEditRow(editRow - remainder);
}
else
{
setEditRow(editRow - 0x80);
}
}
break;
case VK_END:
if (GetKeyState(VK_CONTROL) < 0)
{
setEditRow(rows-1);
}
else
{
int remainder = editRow % 0x80;
if(remainder)
{
setEditRow(0x80 + editRow - remainder);
}
else
{
setEditRow(editRow + 0x80);
}
}
break;
}
}
Expand Down

0 comments on commit 9f1bb50

Please sign in to comment.