mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-22 01:31:25 +00:00
Added cmd line switch (-altgr-sends-wmchar) to enable sending WM_CHAR for key presses, when AltGr is down. (Fixes #625)
This commit is contained in:
parent
82c2f3d142
commit
cd9a207bee
@ -59,9 +59,12 @@
|
||||
-hook-alt-tab<br>
|
||||
By default the emulator doesn't hook ALT+TAB. Use this to allow Open Apple+TAB to be readable by the emulated machine.<br><br>
|
||||
-hook-altgr-control<br>
|
||||
By default the emulator doesn't suppress ALT GR's (Right Alt's) fake LEFT CONTROL. Use this to suppress this fake LEFT CONTROL to allow Closed Apple+CTRL+<key> to be readable by the emulated machine.<br>
|
||||
NB. Suppressing this fake LEFT CONTROL seems to prevent international keyboards from being able to type certain keys.
|
||||
<br><br>
|
||||
By default the emulator doesn't suppress AltGr's (Right Alt's) fake LEFT CONTROL. Use this to suppress this fake LEFT CONTROL to allow Solid Apple+CTRL+<key> to be readable by the emulated machine.<br>
|
||||
NB. Suppressing this fake LEFT CONTROL seems to prevent international keyboards from being able to type certain keys.<br><br>
|
||||
-altgr-sends-wmchar<br>
|
||||
Use this switch to allow Solid Apple (AltGr) to be used in combination with regular keys.<br>
|
||||
When AltGr is pressed, Windows only sends a WM_CHAR message for (eg) international key codes; and so by default the emulator doesn't explicitly send a WM_CHAR message for regular keys when AltGr is being pressed.<br>
|
||||
NB. Using this switch may prevent international keyboards from being able to type certain keys.<br><br>
|
||||
-use-real-printer<br>
|
||||
Enables Advanced configuration control to allow dumping to a real printer<br><br>
|
||||
-noreg<br>
|
||||
|
@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "Frame.h"
|
||||
#include "Harddisk.h"
|
||||
#include "Joystick.h"
|
||||
#include "Keyboard.h"
|
||||
#include "LanguageCard.h"
|
||||
#include "Log.h"
|
||||
#include "Memory.h"
|
||||
@ -1356,6 +1357,10 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
||||
{
|
||||
g_bHookAltGrControl = true;
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-altgr-sends-wmchar") == 0) // GH#625
|
||||
{
|
||||
KeybSetAltGrSendsWM_CHAR(true);
|
||||
}
|
||||
else if (strcmp(lpCmdLine, "-no-hook-alt") == 0) // GH#583
|
||||
{
|
||||
JoySetHookAltKeys(false);
|
||||
|
@ -53,11 +53,17 @@ static bool g_bCapsLock = true; //Caps lock key for Apple2 and Lat/Cyr lock for
|
||||
static bool g_bP8CapsLock = true; //Caps lock key of Pravets 8A/C
|
||||
static BYTE keycode = 0; // Current Apple keycode
|
||||
static BOOL keywaiting = 0;
|
||||
static bool g_bAltGrSendsWM_CHAR = false;
|
||||
|
||||
//
|
||||
// ----- ALL GLOBALLY ACCESSIBLE FUNCTIONS ARE BELOW THIS LINE -----
|
||||
//
|
||||
|
||||
void KeybSetAltGrSendsWM_CHAR(bool state)
|
||||
{
|
||||
g_bAltGrSendsWM_CHAR = state;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void KeybReset()
|
||||
@ -306,7 +312,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
|
||||
return;
|
||||
keycode = n;
|
||||
}
|
||||
else if ((GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558
|
||||
else if (g_bAltGrSendsWM_CHAR && (GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558, GH#625
|
||||
{
|
||||
if (IsVirtualKeyAnAppleIIKey(key))
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ enum Keystroke_e {NOT_ASCII=0, ASCII};
|
||||
void ClipboardInitiatePaste();
|
||||
|
||||
void KeybReset();
|
||||
void KeybSetAltGrSendsWM_CHAR(bool state);
|
||||
bool KeybGetCapsStatus();
|
||||
bool KeybGetP8CapsStatus();
|
||||
bool KeybGetAltStatus();
|
||||
|
@ -279,12 +279,14 @@ Legend:
|
||||
Edge Case for Color Bleed !
|
||||
2000:40 00
|
||||
2400:40 80
|
||||
Nox Archaist (GH#616)
|
||||
2000:00 40 9E // Green Black White
|
||||
*/
|
||||
|
||||
// Fixup missing pixels that normally have been scan-line shifted -- Apple "half-pixel" -- but cross 14-pixel boundaries.
|
||||
if( hibit )
|
||||
{
|
||||
if ( aPixels[1] ) // preceeding pixel on?
|
||||
if ( aPixels[1] ) // preceding pixel on?
|
||||
#if 0 // Optimization: Doesn't seem to matter if we ignore the 2 pixels of the next byte
|
||||
for (iPixel = 0; iPixel < 9; iPixel++) // NOTE: You MUST start with the preceding 2 pixels !!!
|
||||
if (aPixels[iPixel]) // pixel on
|
||||
|
Loading…
x
Reference in New Issue
Block a user