I generalised calls from the VDU driver to read the SHIFT keys to a kbd_modkey() call. At the moment the only caller is the VDU driver for paged scrolling, and it passes an argument of 1, kbd_modkey() just tests the SHIFT key but it should be generalisable for other modifier keys - for instance pausing scrolling with Shift+Ctrl.
I have two thoughts about the parameter to pass: the key number or a bitmap of keys.
With keynumber, kbd_modkey(1) would test SHIFT, kbd_modkey(2) would test CTRL, kbd_modkey(3) would test ALT, so kbd_modkey(1) | kbd_modkey(2) would test for Shift+Ctrl.
With a bitmap, kbd_modkey(1) would test SHIFT, kbd_modkey(2) would test CTRL, kbd_modkey(4) would test ALT, so kbd_modkey(3) would test for Shift+Ctrl.
Thinking forward, which would be the most useful? bitmap optimises the caller, but keynum optimises the callee. The equivalent call in the BBC MOS returns a bitmap.
I generalised calls from the VDU driver to read the SHIFT keys to a kbd_modkey() call. At the moment the only caller is the VDU driver for paged scrolling, and it passes an argument of 1, kbd_modkey() just tests the SHIFT key but it should be generalisable for other modifier keys - for instance pausing scrolling with Shift+Ctrl.
I have two thoughts about the parameter to pass: the key number or a bitmap of keys. With keynumber, kbd_modkey(1) would test SHIFT, kbd_modkey(2) would test CTRL, kbd_modkey(3) would test ALT, so kbd_modkey(1) | kbd_modkey(2) would test for Shift+Ctrl. With a bitmap, kbd_modkey(1) would test SHIFT, kbd_modkey(2) would test CTRL, kbd_modkey(4) would test ALT, so kbd_modkey(3) would test for Shift+Ctrl.
Thinking forward, which would be the most useful? bitmap optimises the caller, but keynum optimises the callee. The equivalent call in the BBC MOS returns a bitmap.