HAHAH! I did it!
Thank you Mathis, you get me in right way.
Indeed it was the ain_mode=switch parameter but i need to attach sustain pedal and aftertouch to J5A (A0,A1) on core module.
So I used something like this:
AIN enable_mask=110000
to enable pin A0 and A1 on J5A
and then:
EVENT_AIN id=1 type=Aftertouch chn= 1 range=0:127 ain_mode=switch lcd_pos=1:1:2 label="Aftertouch: %3d%B"
and for the sustain pedal:
EVENT_AIN id=1 type=CC chn= 2 cc= 64 ain_mode=switch range=0:127 lcd_pos=1:1:2 label="SustainPedal: %3d%B"
and pitch/mod wheels attached to the ainser module with:
AINSER n=1 enabled=1 cs=0 num_pins=64 resolution=7bit
AINSER pinrange=1:18:4065
AINSER pinrange=2:128:4065:spread_center
EVENT_AINSER id=1 type=CC chn= 1 cc= 1 range=0:127 lcd_pos=1:1:2 label="ModWheel: %3d%B"
EVENT_AINSER id=2 type=PitchBend chn= 2 range=0:16383 lcd_pos=1:1:2 label="PitchBender: %5d%B"
and everything works just perfect!!!
For keyboard is somethink like this:
KEYBOARD n=1 rows=12 dout_sr1=1 dout_sr2=2 din_sr1=1 din_sr2=2 \
din_inverted=0 break_inverted=0 din_key_offset=40 \
scan_velocity=1 scan_optimized=1 note_offset=21 \
delay_fastest=5 delay_fastest_black_keys=0 delay_slowest=100
EVENT_KB id=1 type=NoteOn chn=1 key=any use_key_number=1 range=0:127 lcd_pos=1:1:1 label="Note %n"
And i need to tell you that is working better than the original :D Velocity is very nice, i love it!
Thank you one more time.
Best wishes,
Michał.