exclusive use of regular Fn keys for cross-platform (e.g., MacBook)

This commit is contained in:
Christopher Mosher 2018-12-20 21:12:15 -05:00
parent a5e643669c
commit 57f9dc3045
2 changed files with 11 additions and 11 deletions

View File

@ -304,10 +304,10 @@ void Emulator::dispatchKeypress(const SDL_KeyboardEvent& keyEvent) {
* simple key-presses that we send to the apple.
*/
if (sym == SDLK_PAUSE) {
if (sym == SDLK_F6) {
this->apple2.reset();
return;
} else if (sym == SDLK_INSERT) {
} else if (sym == SDLK_F7) {
// Feed input from the clipboard to the Apple keyboard
std::string s = this->clip.getText();
for (unsigned int i = 0; i < s.length(); ++i) {
@ -364,11 +364,11 @@ void Emulator::dispatchKeypress(const SDL_KeyboardEvent& keyEvent) {
this->screenImage.enterCommandMode();
return;
}// ...else exit the entire emulation
else if (sym == SDLK_END) {
else if (sym == SDLK_F9) {
this->quit = true;
return;
}// ...else save a screen shot
else if (sym == SDLK_PRINTSCREEN) {
else if (sym == SDLK_F8) {
this->screenImage.saveBMP();
return;
}

View File

@ -143,9 +143,9 @@ void ScreenImage::drawFnKeys() {
drawText(
" FULLSCRN SCAN-LINES KEYBOARD", r++, c);
drawText(
" XXXXXXXXXXXXXX WINDOW FILL-LINES CMD REPT HYPER BUFFER RESET PASTE SAVE BMP QUIT!", r++, c);
" XXXXXXXXXXXXXX WINDOW FILL-LINES CMD RESET PASTE SAVE BMP QUIT! REPT HYPER BUFFER ", r++, c);
drawText(
" F1 F2 F3 F4 F5 F10 F11 F12 Break Insert PrintScreen End", r++, c);
" F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 ", r++, c);
if (this->fullscreen)
invertText(76, 32, 42); // FULLSCRN
@ -158,10 +158,10 @@ void ScreenImage::drawFnKeys() {
invertText(76, 43, 55); // SCAN-LINES
if (this->hyper)
invertText(77, 67, 74); // HYPER
invertText(77, 102, 109); // HYPER
if (this->buffer)
invertText(77, 75, 83); // BUFFER
invertText(77, 110, 118); // BUFFER
drawDisplayLabel();
}
@ -184,12 +184,12 @@ void ScreenImage::cycleDisplayLabel() {
void ScreenImage::toggleHyperLabel() {
this->hyper = !this->hyper;
invertText(77, 67, 74); // HYPER
invertText(77, 102, 109); // HYPER
}
void ScreenImage::toggleKdbBufferLabel() {
this->buffer = !this->buffer;
invertText(77, 75, 83); // BUFFER
invertText(77, 110, 118); // BUFFER
}
void ScreenImage::invertText(int row, int begincol, int endcol) {