Active Topics

 


Reply
Thread Tools
tobiasj's Avatar
Posts: 241 | Thanked: 74 times | Joined on Jul 2007
#1
I have been searching for some time this morning but since I am not really sure what I am searching for I dont know HOW to search for it.

I am trying to update the Atari800 emulator to work more properly on the N810, one of the big issues is the fact that the N810 keyboard return key sends KP_Enter and not K_Return (which is on the center button of the directional pad) the Atari 800 had no concept of a KP_Enter key and outputs a Atascii character to the screen instead of a return. So what I want to do (I assume) is either before launch of Atari800 change the keymapping that the N810 does so that the return key sends SDLK_Return (Xmodkey maybe?) or change the code of the emulator so that it intercepts the SDLKP_Enter and then handles it as if it were a SDLK_Return.

Neither of which I have any idea how to accomplish. Does anyone have any ideas I might try/butcher into working for this?

Thanks,

-John
 
TrueJournals's Avatar
Posts: 480 | Thanked: 378 times | Joined on Apr 2008 @ Chicago-ish
#2
Try this: In atari_sdl.c, find:
Code:
	case SDLK_RETURN:
		return AKEY_RETURN ^ shiftctrl;
And change it to:
Code:
	case SDLK_ENTER:
	case SDLK_RETURN:
		return AKEY_RETURN ^ shiftctrl;
If that doesn't work, try changing the same code to:
Code:
	case SDLK_ENTER:
		return AKEY_RETURN ^ shiftctrl;
	case SDLK_RETURN:
		return AKEY_RETURN ^ shiftctrl;
Not quite sure on the C syntax, and too lazy to look it up.
__________________
Disclaimer: If a program I wrote doesn't work/breaks your tablet... It's not my fault
mcedit | Utility Calculators (WIP) | PyRDesktop
My Blog | Twitter

Last edited by TrueJournals; 2009-03-03 at 04:47.
 

The Following User Says Thank You to TrueJournals For This Useful Post:
tobiasj's Avatar
Posts: 241 | Thanked: 74 times | Joined on Jul 2007
#3
You know, I thought along those lines, but convinced myself it couldn't be that easy.

I actually had to use this:

Code:
        case SDLK_KP_ENTER:
                return AKEY_RETURN ^ shiftctrl;
        case SDLK_RETURN:
                return AKEY_RETURN ^ shiftctrl;
Because they had to be seperate cases and it was SDK_KP_ENTER but it works perfectly.
I guess that will teach me that it really CAN be that easy. Thats what I like about these forums. I learn something new every day.

Thanks a ton for the info.

-John
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:37.