diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-04-17 10:31:14 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-04-17 10:31:14 +0100 |
commit | 4f22f1677698d4114b76c1ddb4216f48892c8d9c (patch) | |
tree | ed687c468ca2650ffc7d8a6595a41fc96cfd9e26 /src/gui | |
parent | 45183e34632af471e95a798db578e44c5319c4ad (diff) | |
download | fpGUI-4f22f1677698d4114b76c1ddb4216f48892c8d9c.tar.xz |
Revert "Add common procedures in fpg_base for deadkeys"
This reverts commit ccfd4b2ae0a9dfae0d19ae7ba673118af70c75da.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_edit.pas | 33 | ||||
-rw-r--r-- | src/gui/fpg_editcombo.pas | 33 | ||||
-rw-r--r-- | src/gui/fpg_memo.pas | 33 |
3 files changed, 90 insertions, 9 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas index 21e6895e..01c52d4c 100644 --- a/src/gui/fpg_edit.pas +++ b/src/gui/fpg_edit.pas @@ -758,7 +758,34 @@ begin prevval := Text; if FDeadKeyChar> -1 then begin - AText:= UseDeadKey(AText, FDeadKeyChar); + case FDeadKeyChar of + keyDeadDiaeresis: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ë'; + 'i': + AText:= 'ï'; + 'o': + AText:= 'ö'; + 'u': + AText:= 'ü'; + end; + keyDeadCircumflex: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ê'; + 'i': + AText:= 'î'; + 'o': + AText:= 'ô'; + 'u': + AText:= 'û'; + end; + end; FDeadKeyChar:= -1; end; s := AText; @@ -804,8 +831,8 @@ begin hasChanged := False; fpgApplication.HideHint; - if FDeadKeyChar = -1 then - FDeadKeyChar:= ReadDeadKey(keycode); + if (keycode= keyDeadCircumflex) or (keycode= keyDeadDiaeresis) then + FDeadKeyChar:= keycode; Consumed := True; case CheckClipBoardKey(keycode, shiftstate) of diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas index 9145d641..72b804ef 100644 --- a/src/gui/fpg_editcombo.pas +++ b/src/gui/fpg_editcombo.pas @@ -526,7 +526,34 @@ begin prevval := FText; if FDeadKeyChar> -1 then begin - AText:= UseDeadKey(AText, FDeadKeyChar); + case FDeadKeyChar of + keyDeadDiaeresis: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ë'; + 'i': + AText:= 'ï'; + 'o': + AText:= 'ö'; + 'u': + AText:= 'ü'; + end; + keyDeadCircumflex: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ê'; + 'i': + AText:= 'î'; + 'o': + AText:= 'ô'; + 'u': + AText:= 'û'; + end; + end; FDeadKeyChar:= -1; end; s := AText; @@ -590,8 +617,8 @@ var begin hasChanged := False; - if FDeadKeyChar = -1 then - FDeadKeyChar:= ReadDeadKey(keycode); + if (keycode= 58536) or (keycode= 58462) then + FDeadKeyChar:= keycode; if not Enabled then consumed := False diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas index 2769e4d4..c0b227ae 100644 --- a/src/gui/fpg_memo.pas +++ b/src/gui/fpg_memo.pas @@ -1064,7 +1064,34 @@ begin prevval := Text; if FDeadKeyChar> -1 then begin - AText:= UseDeadKey(AText, FDeadKeyChar); + case FDeadKeyChar of + keyDeadDiaeresis: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ë'; + 'i': + AText:= 'ï'; + 'o': + AText:= 'ö'; + 'u': + AText:= 'ü'; + end; + keyDeadCircumflex: + case AText of + 'a': + AText:= 'â'; + 'e': + AText:= 'ê'; + 'i': + AText:= 'î'; + 'o': + AText:= 'ô'; + 'u': + AText:= 'û'; + end; + end; FDeadKeyChar:= -1; end; s := AText; @@ -1115,8 +1142,8 @@ begin Consumed := True; hasChanged := False; - if FDeadKeyChar = -1 then - FDeadKeyChar:= ReadDeadKey(keycode); + if (keycode= 58536) or (keycode= 58462) then + FDeadKeyChar:= keycode; case CheckClipBoardKey(keycode, shiftstate) of ckCopy: |