This might be interesting. I have tried from within Debian and captured the events with xev (German layout). As you can see both times the same keycode (119) gets registered. All events are double, one for press (state=0) and one for depress (state=1).
So, if our devices are not different hardware wise, I suspect this is a software issue. Might be in the kernel (since the Debian kernel got some modifications in the keyboard driver (there have been some simplifications at the time the keyboard off on lid close fix came in). But in my opinion it is much more probable, that the issue is somewhere in user space. Maybe Adam can confirm that his changes cannot be connected to the different behavior regarding Debian and Android.
KeyPress event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63523035, (314,821), root:(1758,894),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63523655, (314,821), root:(1758,894),
state 0x1, keycode 22 (keysym 0xffff, Delete), same_screen YES,
XKeysymToKeycode returns keycode: 119
XLookupString gives 1 bytes: (7f) ""
XmbLookupString gives 1 bytes: (7f) ""
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63524022, (314,821), root:(1758,894),
state 0x1, keycode 22 (keysym 0xffff, Delete), same_screen YES,
XKeysymToKeycode returns keycode: 119
XLookupString gives 1 bytes: (7f) ""
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63524628, (314,821), root:(1758,894),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63526428, (314,821), root:(1758,894),
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63527016, (314,821), root:(1758,894),
state 0x1, keycode 22 (keysym 0xffff, Delete), same_screen YES,
XKeysymToKeycode returns keycode: 119
XLookupString gives 1 bytes: (7f) ""
XmbLookupString gives 1 bytes: (7f) ""
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63527283, (314,821), root:(1758,894),
state 0x1, keycode 22 (keysym 0xffff, Delete), same_screen YES,
XKeysymToKeycode returns keycode: 119
XLookupString gives 1 bytes: (7f) ""
XFilterEvent returns: False
KeyRelease event, serial 49, synthetic NO, window 0x2e00001,
root 0x271, subw 0x0, time 63527762, (314,821), root:(1758,894),
state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False