Ubuntu getting from ir-keytable to kodi

Hi Guys!

I just cant seemt to get it to work. I have been searching around to try to figure out what is wrong.

I have Ubuntu 16.04.2 with Kodi 17 from ppa.

First running

Code:
sudo ir-keytable -t -d /dev/input/event2

I get all KEY_* codes so all is good sofar. Then i cant seem to get any output from irw but since some buttons work this does not feel like a problem.

Then i try to get it to work in kodi and only some buttons work.

My lircmap.xml (in .kodi/userdata/Lircmap.xml)
For example up/down/left/right works but KEY_OK and KEY_EXIT dont work.

Code:
<lircmap>
        <remote device="devinput">
                <eject>KEY_EJECTCD</eject>
                <left>KEY_LEFT</left>
                <right>KEY_RIGHT</right>
                <up>KEY_UP</up>
                <down>KEY_DOWN</down>
                <select>KEY_OK</select>
                <start>KEY_HOME</start>
                <back>KEY_BACK</back>
                <exit>KEY_EXIT</exit>
                <record>KEY_RECORD</record>
                <play>KEY_PLAY</play>
                <pause>KEY_PAUSE</pause>
                <stop>KEY_STOP</stop>
                <forward>KEY_FORWARD</forward>
                <reverse>KEY_REWIND</reverse>
                <volumeplus>KEY_VOLUMEUP</volumeplus>
                <volumeminus>KEY_VOLUMEDOWN</volumeminus>
                <pageplus>KEY_CHANNELUP</pageplus>
                <pageminus>KEY_CHANNELDOWN</pageminus>
                <skipplus>KEY_NEXT</skipplus>
                <skipminus>KEY_AGAIN</skipminus>
                <mute>KEY_MUTE</mute>
                <power>KEY_POWER</power>
                <myvideo>KEY_VIDEO</myvideo>
                <mymusic>KEY_AUDIO</mymusic>
                <livetv>LiveTV</livetv>
                <guide>KEY_EPG</guide>
                <one>KEY_NUMERIC_1</one>
                <two>KEY_NUMERIC_2</two>
                <three>KEY_NUMERIC_3</three>
                <four>KEY_NUMERIC_4</four>
                <five>KEY_NUMERIC_5</five>
                <six>KEY_NUMERIC_6</six>
                <seven>KEY_NUMERIC_7</seven>
                <eight>KEY_NUMERIC_8</eight>
                <nine>KEY_NUMERIC_9</nine>
                <zero>KEY_0</zero>
                <red>KEY_RED</red>
                <green>KEY_GREEN</green>
                <yellow>KEY_YELLOW</yellow>
                <blue>KEY_BLUE</blue>
                <menu>KEY_DVD</menu>
                <clear>KEY_CLEAR</clear>
                <enter>KEY_ENTER</enter>
        </remote>
</lircmap>

my remotes.xml in .kodi/userdata/keymap/.
I have only added the button i have problems with.

Code:
<keymap>
  <global>
    <remote>
      <select>Select</select>
    </remote>
  </global>
</keymap>

Any clues? Suggestions?

Thanks
Anders