Xpadder is a common recommendation, I can offer an oddball recommendation to you that I think I came up with

First of all let me state a problem I found out the hard way, all MAME versions after 1.17 do not work with these keyboard emulation problems. This is probably your problem right upfront. If you go to 1.17 or older Xpadder will probably work.
1.17 is when Mame started to work with multiple keyboards or something like that, but these emulation programs for some reason do not work.
However you said even Windows Apps are not seeing the key presses (like notepad I guess) so that means Mame is not the problem and the program is.
So here is my solution for you:
Go download a program called Glovepie -
http://carl.kenner.googlepages.com/glovepie_downloadThis is the program I use to make my computer work with my wiimote (by the way arcade lovers, the wiimote is an awesome addition to your arcade

) so glovepie is a very powerfull and raw tool that can basically take any input and turn it into a different output of your choice.
Its script based so it takes a small learning curve to get started with it, but it does have this GUI built in that can detect input & outputs for you to make easy scripts.
Here is a semi advance script I wrote for my wiimote to controll winamp on my PC
//Really Cool Winamp Script for global keys
//Created by ViciousXUSMC some original script from Spence 2008
//The settings are pretty straight forward,
// Track Changes using a 'Flicking' Technique. (LEFT/RIGHT Flick) make value higher for a harder flick or less for a soft one.
Key.Ctrl + Key.Alt + Key.PageUp = (Wiimote1.RelAccX < -40) in m per s per s
Key.Ctrl + Key.Alt + Key.PageDown = (Wiimote1.RelAccX > 40) in m per s per s
// *************The Technique Below Requires You To Press & Hold The B button whilst tilting**************
// Skip Forward Slow (Tilt the wiimote more than 20 degreees to the right, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
Key.Ctrl + Key.Alt + Key.Right = (Wiimote1.Roll > 20 but < 60) deg
wait 400 ms
key.ctrl + key.alt + Key.Right = false
endif
// Skip Forward Fast (Tilt the wiimote more than 80 degrees to the right to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
Key.Ctrl + Key.Alt + key.right = (Wiimote1.Roll > 80) deg
wait 50 ms
key.ctrl + key.alt + Key.Right = false
endif
// Tilt wiimote up or down while holding B to change volume you will feel vibration while changing volume.
if wiimote.b = true and wiimote1.pitch < -25 then
volumedown = true
wiimote1.Rumble = true
wait 40 ms
volumedown = false
wiimote1.rumble = false
endif
if wiimote1.pitch > 30 and wiimote.b = true then
wiimote1.rumble = true
volumeup = true
wait 40 ms
wiimote1.rumble = false
volumeup = false
endif
// Skip Back Fast (Tilt the wiimote more than 80 degrees to the left to do a super seek....It does skip VERY fast
// so you can simply hold the wiimote at 90 degrees and 'flick' the B button to do 10 second incriments)
if wiimote.b = true then
Key.Ctrl + Key.Alt + key.Left = (Wiimote1.Roll < -80) deg
wait 50 ms
key.ctrl + key.alt + Key.Left = false
endif
// Skip Back Slow (Tilt the wiimote more than 20 degreees to the left, but not more than 60 degrees to achive a slow
// seeking speed)
if wiimote.b = true then
Key.Ctrl+ Key.Alt+ Key.Left = (Wiimote1.Roll < -20 but > -60) deg
wait 400 ms
key.ctrl + key.alt + Key.Left = false
endif
// Toggle Visual Effects: Press A to turn on and off
// this is not a default global key and must be added manaually ctrl + alt + v
if Wiimote.A = true then
Key.Ctrl + Key.Alt + Key.V = true
wait 400 ms
Key.Ctrl+ Key.Alt+ Key.V= false
endif
//***********************************************************************************************************************
//Play/Pause use the home button on the wiimote
Key.PlayPause = Wiimote.Home
endif
//Code taken from the Original 'Wiimouse_IR' Script. I have made a slight change to the delay to suit my taste.
//Thanks due once again.
//D-Pad
if wiimote.Up
Up = true
Wait 90 ms
Up = false
endif
if wiimote.Down
Down = true
Wait 90 ms
Down = false
endif
if wiimote.Left
key.ctrl + key.alt + key.pageup = true
Wait 90 ms
key.ctrl + key.alt + key.PageUp = false
endif
if wiimote.Right
key.ctrl + key.alt + key.pagedown = true
Wait 90 ms
key.ctrl + key.alt + key.pagedown = false
endif
//Wianamp Volume From same script as D-Pad Functions
if wiimote.plus then
key.ctrl + key.alt+ key.Up = true
wait 60 ms
key.ctrl + key.alt+ key.Up = false
endif
if wiimote.minus then
key.ctrl + key.alt+ key.down = true
wait 60 ms
key.ctrl + key.alt+ key.down = false
endif
As you can see I make use of the tilt, the accelerometer and all that jazz. Its a really cool tool and that was mostly just to show you how you can use advanced script like "if" statements.
Now the solution to your problem. I actually had the same problem just a few days ago and fixed it with glovepie.
I have my wireless 360 controller and wanted to play MVC2 on NullDC emulator. That emulator does not accept gamepads only keyboards. So I wrote this script:
// ViciousXUSMC's Code to use Wireless 360 Controller with Emulators
Key.right = Joystick1.x>.2
key.Left=joystick1.x<-.2
key.Down=joystick1.y>.2
key.Up=joystick1.y<-.2
Key.A=joystick1.Button1
Key.h=Joystick1.Button2
key.B=joystick1.Button3
key.C=joystick1.Button4
key.D=joystick1.Button5
key.E=joystick1.Button6
key.F=joystick1.Button7
key.G=joystick1.Button8
See how simple that code is? You just need to tweak it for the buttons your gamepad has, and if its gamepad 2 or 3 or something change that as needed.