Skip to content

Commit

Permalink
Fix paste kbd assignment (MAC / WIN)
Browse files Browse the repository at this point in the history
  • Loading branch information
kktos committed Jan 17, 2021
1 parent ea2b5c6 commit 0064a5c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/debugger/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ static void DEBUG_Command_Handler(ConsoleInformation *console, char* command);
//
// *******************************************************************************************

#ifdef __APPLE__
#define CMD_KEY KMOD_GUI
#else
#define CMD_KEY KMOD_CTRL
#endif

//
// 0-9A-F sets the program address, with shift sets the data address.
//
Expand Down Expand Up @@ -201,7 +207,7 @@ bool DEBUGisOnBreakpoint(int addr, TBreakpointType type) {
// *******************************************************************************************
void DEBUGstop() {
currentPC = pc;
currentPCBank= currentPC < 0xC000 ? memory_get_ram_bank() : memory_get_rom_bank();
currentPCBank= -1;
currentMode = DMODE_STOP;
}

Expand Down Expand Up @@ -627,7 +633,8 @@ static int DEBUGHandleKeyEvent(SDL_Event *event) {
// return 1;

case SDLK_v:
if(event->key.keysym.mod & KMOD_CTRL) {

if(event->key.keysym.mod & CMD_KEY) {
char *text= SDL_GetClipboardText();
if(text) {
Cursor_Paste(console, text);
Expand Down

0 comments on commit 0064a5c

Please sign in to comment.