From 4f22f1677698d4114b76c1ddb4216f48892c8d9c Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 17 Apr 2013 10:31:14 +0100 Subject: Revert "Add common procedures in fpg_base for deadkeys" This reverts commit ccfd4b2ae0a9dfae0d19ae7ba673118af70c75da. --- src/gui/fpg_edit.pas | 33 ++++++++++++++++++++++++++++++--- src/gui/fpg_editcombo.pas | 33 ++++++++++++++++++++++++++++++--- src/gui/fpg_memo.pas | 33 ++++++++++++++++++++++++++++++--- 3 files changed, 90 insertions(+), 9 deletions(-) (limited to 'src/gui') 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: -- cgit v1.2.3-70-g09d2