Hey, this sounds a bit like my zipit build. The zipit has a weird keyboard and no touchscreen.
http://macrofig.blogspot.com/There's a tiny patch for the zipit buttons in the Tweaking Rockbox blog post. That'll show you where to look. I think there have been some updates for pandora and maemo keyboards since I grabbed the sources. (It's about time to refetch from svn and do the patch the right way)
Building without touchscreen support is a bit tricky. Your best bet is to disable both HAVE_TOUCHSCREEN and HAVE_BUTTON_DATA because they're a bit tangled up in the code. Back in February that was done in firmware/export/config/application.h, but now I think it's been split up and moved to sdlapp.h I also had to add the keymap-touchscreen.c file back into apps/SOURCES because the keymap-sdl.c file still needed it when HAVE_TOUCHSCREEN was disabled. Not sure if that's fixed yet.
#elif CONFIG_KEYPAD == SDL_PAD
keymaps/keymap-sdl.c
#ifndef HAVE_TOUCHSCREEN
keymaps/keymap-touchscreen.c
#endif
#endif
Good luck and have fun