mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2025-02-21 13:29:03 +00:00
capslock fixes
This commit is contained in:
parent
566cec6cc3
commit
21abee59bf
@ -1894,7 +1894,11 @@ end;
|
||||
|
||||
procedure TGUIForm.tbCapsModeClick(Sender: TObject);
|
||||
begin
|
||||
miINPAllCapsClick(sender);
|
||||
if GetConfig('input/init.uppercase') = '0' then
|
||||
UpdateConfig( 'input/init.uppercase', '1', false )
|
||||
else
|
||||
UpdateConfig( 'input/init.uppercase', '0', false );
|
||||
|
||||
UpdateAllCaps;
|
||||
end;
|
||||
|
||||
@ -2897,29 +2901,46 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Caps := Odd(GetKeyState(VK_CAPITAL));
|
||||
{$ENDIF}
|
||||
|
||||
if isCaps then
|
||||
keydesc := 'caps';
|
||||
|
||||
case Key of
|
||||
VK_BACK:
|
||||
if isCtrl and isShift then
|
||||
Result := 0;
|
||||
VK_RETURN: begin
|
||||
if not isAlt then
|
||||
Result := 13
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
VK_SHIFT: Result := 0;
|
||||
//VK_SHIFT: Result := 0;
|
||||
VK_CAPITAL: begin
|
||||
if KeyUp then
|
||||
begin
|
||||
Caps := (not Caps);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
{$IFDEF DARWIN}
|
||||
Caps := (not KeyUp);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
{$ELSE}
|
||||
{$IFDEF WINDOWS}
|
||||
|
||||
{$ELSE}
|
||||
if KeyUp then
|
||||
begin
|
||||
Caps := (not Caps);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
VK_MENU: if (not isAlt and not isShift) then
|
||||
Result := OPEN_APPLE
|
||||
else if (isShift) then
|
||||
@ -3079,9 +3100,9 @@ procedure TGUIForm.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState)
|
||||
var
|
||||
code: integer;
|
||||
begin
|
||||
//code := MapKeyCode(Key,Shift,true);
|
||||
//if code <> 0 then
|
||||
// SendKey( code, 0, 0, MapShiftState(Key, Shift) );
|
||||
code := MapKeyCode(Key,Shift,true);
|
||||
if code <> 0 then
|
||||
SendKey( code, 0, 0, MapShiftState(Key, Shift) );
|
||||
//StatusBar1.SimpleText := 'keycode ' + IntToStr(Key);
|
||||
end;
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="2868"/>
|
||||
<CursorPos X="10" Y="2886"/>
|
||||
<TopLine Value="694"/>
|
||||
<CursorPos X="16" Y="699"/>
|
||||
<UsageCount Value="323"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
54
main.pas
54
main.pas
@ -1894,7 +1894,11 @@ end;
|
||||
|
||||
procedure TGUIForm.tbCapsModeClick(Sender: TObject);
|
||||
begin
|
||||
miINPAllCapsClick(sender);
|
||||
if GetConfig('input/init.uppercase') = '0' then
|
||||
UpdateConfig( 'input/init.uppercase', '1', false )
|
||||
else
|
||||
UpdateConfig( 'input/init.uppercase', '0', false );
|
||||
|
||||
UpdateAllCaps;
|
||||
end;
|
||||
|
||||
@ -2897,6 +2901,13 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Caps := Odd(GetKeyState(VK_CAPITAL));
|
||||
{$ENDIF}
|
||||
|
||||
if isCaps then
|
||||
keydesc := 'caps';
|
||||
|
||||
case Key of
|
||||
VK_RETURN: begin
|
||||
if not isAlt then
|
||||
@ -2904,19 +2915,30 @@ begin
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
VK_SHIFT: Result := 0;
|
||||
//VK_SHIFT: Result := 0;
|
||||
VK_CAPITAL: begin
|
||||
if KeyUp then
|
||||
begin
|
||||
Caps := (not Caps);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
{$IFDEF DARWIN}
|
||||
Caps := (not KeyUp);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
{$ELSE}
|
||||
{$IFDEF LINUX}
|
||||
if KeyUp then
|
||||
begin
|
||||
Caps := (not Caps);
|
||||
if Caps then
|
||||
keydesc := 'Caps On'
|
||||
else
|
||||
keydesc := 'Caps Off';
|
||||
Result := 0;
|
||||
exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
VK_MENU: if (not isAlt and not isShift) then
|
||||
Result := OPEN_APPLE
|
||||
else if (isShift) then
|
||||
@ -3076,9 +3098,9 @@ procedure TGUIForm.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState)
|
||||
var
|
||||
code: integer;
|
||||
begin
|
||||
//code := MapKeyCode(Key,Shift,true);
|
||||
//if code <> 0 then
|
||||
// SendKey( code, 0, 0, MapShiftState(Key, Shift) );
|
||||
code := MapKeyCode(Key,Shift,true);
|
||||
if code <> 0 then
|
||||
SendKey( code, 0, 0, MapShiftState(Key, Shift) );
|
||||
//StatusBar1.SimpleText := 'keycode ' + IntToStr(Key);
|
||||
end;
|
||||
|
||||
|
388
poc.lps
388
poc.lps
@ -1,194 +1,194 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="11"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="6">
|
||||
<Unit0>
|
||||
<Filename Value="poc.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="323"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="main.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="GUIForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="694"/>
|
||||
<CursorPos X="16" Y="699"/>
|
||||
<UsageCount Value="323"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="mixer.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmMixer"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="3"/>
|
||||
<CursorPos X="26" Y="25"/>
|
||||
<UsageCount Value="206"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="C:\lazarus\lcl\include\picture.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="576"/>
|
||||
<CursorPos X="49" Y="591"/>
|
||||
<UsageCount Value="100"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="C:\lazarus\components\lazutils\utf8process.pp"/>
|
||||
<UnitName Value="UTF8Process"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="636"/>
|
||||
<CursorPos Y="654"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="images\memory.pas"/>
|
||||
<ComponentName Value="memform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="17" Y="44"/>
|
||||
<UsageCount Value="14"/>
|
||||
</Unit5>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="822" Column="15" TopLine="810"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2816" Column="17" TopLine="2765"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2969" Column="14" TopLine="2949"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2978" Column="4" TopLine="2959"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2814" Column="31" TopLine="2799"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2788" Column="19" TopLine="2762"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2855" Column="25" TopLine="2799"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="740" Column="6" TopLine="745"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3151" Column="3" TopLine="3134"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="998" Column="10" TopLine="978"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3151" Column="3" TopLine="3134"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="999" Column="10" TopLine="997"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1110" Column="45" TopLine="1103"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1109" Column="20" TopLine="1098"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="396" Column="15" TopLine="385"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1109" Column="20" TopLine="1104"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="396" Column="29" TopLine="385"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="978" Column="38" TopLine="961"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2868" Column="26" TopLine="2848"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="593" Column="38" TopLine="572"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2987" Column="48" TopLine="2978"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="582" Column="20" TopLine="572"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2809" Column="66" TopLine="2788"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2998" Column="6" TopLine="2978"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3039" Column="26" TopLine="3026"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3035" Column="34" TopLine="3024"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="335" Column="59" TopLine="318"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3046" Column="36" TopLine="3032"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2882" Column="27" TopLine="2867"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2888" Column="23" TopLine="2877"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0" ActiveMode=""/>
|
||||
</RunParams>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="11"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="6">
|
||||
<Unit0>
|
||||
<Filename Value="poc.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="323"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="main.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="GUIForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="3070"/>
|
||||
<CursorPos X="54" Y="3090"/>
|
||||
<UsageCount Value="323"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="mixer.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmMixer"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="3"/>
|
||||
<CursorPos X="26" Y="25"/>
|
||||
<UsageCount Value="206"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="C:\lazarus\lcl\include\picture.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="576"/>
|
||||
<CursorPos X="49" Y="591"/>
|
||||
<UsageCount Value="100"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="C:\lazarus\components\lazutils\utf8process.pp"/>
|
||||
<UnitName Value="UTF8Process"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="636"/>
|
||||
<CursorPos Y="654"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="images\memory.pas"/>
|
||||
<ComponentName Value="memform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="17" Y="44"/>
|
||||
<UsageCount Value="14"/>
|
||||
</Unit5>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3151" Column="3" TopLine="3134"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="999" Column="10" TopLine="997"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1110" Column="45" TopLine="1103"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1109" Column="20" TopLine="1098"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="396" Column="15" TopLine="385"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1109" Column="20" TopLine="1104"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="396" Column="29" TopLine="385"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="978" Column="38" TopLine="961"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2868" Column="26" TopLine="2848"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="593" Column="38" TopLine="572"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2987" Column="48" TopLine="2978"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="582" Column="20" TopLine="572"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2809" Column="66" TopLine="2788"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2998" Column="6" TopLine="2978"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3039" Column="26" TopLine="3026"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3035" Column="34" TopLine="3024"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="335" Column="59" TopLine="318"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="3046" Column="36" TopLine="3032"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2882" Column="27" TopLine="2867"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2888" Column="23" TopLine="2877"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="706" Column="34" TopLine="732"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2752" Column="28" TopLine="2729"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1788" Column="61" TopLine="1785"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2341" Column="6" TopLine="2313"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1801" Column="28" TopLine="1786"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="2900" Column="14" TopLine="2888"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1897" Column="16" TopLine="1894"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="426" Column="15" TopLine="408"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1183" TopLine="1178"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1923" Column="42" TopLine="1895"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0" ActiveMode=""/>
|
||||
</RunParams>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
Loading…
x
Reference in New Issue
Block a user