shift left/right, shift up/down mappings

This commit is contained in:
April Ayres-Griffiths 2019-04-14 19:26:50 +10:00
parent eeeddeba36
commit ba2db4e5d5
5 changed files with 42 additions and 8 deletions

View File

@ -2162,10 +2162,12 @@ var
S: TStringStream; S: TStringStream;
filename, json: string; filename, json: string;
begin begin
backdrop.Visible := false;
filename := GetUserDir + DirectorySeparator + 'microm8scrn.png'; filename := GetUserDir + DirectorySeparator + 'microm8scrn.png';
json := '{ "path": "' + ReplaceStr(filename, '\', '/') + '" }'; json := '{ "path": "' + ReplaceStr(filename, '\', '/') + '" }';
SimpleFormPost(baseUrl + '/api/control/window/screen', json, S); SimpleFormPost(baseUrl + '/api/control/window/screen', json, S);
backdrop.Picture.LoadFromFile(filename); backdrop.Picture.LoadFromFile(filename);
backdrop.Visible := true;
end; end;
procedure TGUIForm.ReposWindow; procedure TGUIForm.ReposWindow;
@ -2665,6 +2667,10 @@ const
CSR_DOWN = $e003; CSR_DOWN = $e003;
CTRL_A = $e041; CTRL_A = $e041;
SHIFT_CTRL_A = $e071; SHIFT_CTRL_A = $e071;
PAGE_UP = $e004;
PAGE_DOWN = $e005;
SHIFT_LEFT = $e014;
SHIFT_RIGHT = $e015;
begin begin
case Key of case Key of
219: 219:
@ -2722,10 +2728,22 @@ begin
Result := Ord('~') Result := Ord('~')
else else
Result := Ord('`'); Result := Ord('`');
VK_Up: Result := CSR_UP; VK_Up: if (ssShift in Shift) then
VK_Down: Result := CSR_DOWN; Result := PAGE_UP
VK_Left: Result := CSR_LEFT; else
VK_Right: Result := CSR_RIGHT; Result := CSR_UP;
VK_Down: if (ssShift in Shift) then
Result := PAGE_DOWN
else
Result := CSR_DOWN;
VK_Left: if (ssShift in Shift) then
Result := SHIFT_LEFT
else
Result := CSR_LEFT;
VK_Right: if (ssShift in Shift) then
Result := SHIFT_RIGHT
else
Result := CSR_RIGHT;
VK_0..VK_9: VK_0..VK_9:
begin begin
if ssShift in Shift then if ssShift in Shift then

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2667,6 +2667,10 @@ const
CSR_DOWN = $e003; CSR_DOWN = $e003;
CTRL_A = $e041; CTRL_A = $e041;
SHIFT_CTRL_A = $e071; SHIFT_CTRL_A = $e071;
PAGE_UP = $e004;
PAGE_DOWN = $e005;
SHIFT_CSR_LEFT = $e05b;
SHIFT_CSR_RIGHT = $e05c;
begin begin
case Key of case Key of
219: 219:
@ -2724,10 +2728,22 @@ begin
Result := Ord('~') Result := Ord('~')
else else
Result := Ord('`'); Result := Ord('`');
VK_Up: Result := CSR_UP; VK_Up: if (ssShift in Shift) then
VK_Down: Result := CSR_DOWN; Result := PAGE_UP
VK_Left: Result := CSR_LEFT; else
VK_Right: Result := CSR_RIGHT; Result := CSR_UP;
VK_Down: if (ssShift in Shift) then
Result := PAGE_DOWN
else
Result := CSR_DOWN;
VK_Left: if (ssShift in Shift) then
Result := SHIFT_CSR_LEFT
else
Result := CSR_LEFT;
VK_Right: if (ssShift in Shift) then
Result := SHIFT_CSR_RIGHT
else
Result := CSR_RIGHT;
VK_0..VK_9: VK_0..VK_9:
begin begin
if ssShift in Shift then if ssShift in Shift then