And thanks again, I succesfully mapped the 1 to F1, 2 to F3 and 5 to F5. Although it required some steps.
First I mapped (as you told above) with the virtual keyboard the correct keys, and then saved it. After restarting the Vice emulator the keys weren't mapped anymore. When I loaded the keymap again the keys still didn't work. Then I thought maybe I can add the changed keys in the dsl-vicerc file (a bit like the F12 file) but then more like this "49 0 4 9" which is 1 to F1. That didn't work but I noticed that it would load the keymap according thje dsl-vicerc file, but somehow that didn't work.
Looking in the vice.log file I noticed that it says: Loading keymap `/opt/retropie/emulators/vice/lib/vice/C64/sdl_sym.vkm'
Now I wen to that file changed it according to the saved keymap and it works. Strange thing is that is doesn't look at the keymap it should load.
And what I did for the Dosbox is create .sh file. Not sure if it works for C64 but you can try this e.g:
roms\c64\frogger.shsc c64/frogger/keymap.vkm /opt/retropie/emulators/vice/lib/vice/C64/sdl_sym.vkm load frogger\frogger.crt
The problem is I don't know if there is a command to go from the .sh file to the crt/tap/etc file. Don't think 'load' wil do the trick haha.