When pressing the cursor-up or cursor-left keys on the PC keyboard, VICE will correctly interpret this as RIGHT-SHIFT + CRSR-DOWN or RIGHT-SHIFT + CRSR-RIGHT.
(This is the right choice of shift-key, imo, as you would always use right-shift, not left-shift, with the cursor keys on a real C64)
However, if you hold down the left-shift key at the same time as pressing cursor-up/cursor-left, the right-shift is not pressed.
It used to work:
This used to work. I don't have all VICE releases downloaded, but i can see it works in GTK-VICE 3.5, and does not work in GTK-VICE 3.7.1-r43489 or 3.8. (And it also worked in the old WinVICE)
Test program:
I made a quick example program you can test with, to hopefully easily reproduce it. Run it with SYS 4096, then hold down left-shift and press the cursor keys. Only left-shift is pressed, when both should have been pressed, in newer versions of GTK-VICE. Also try just pressing the cursor keys without left-shift: right-shift is now being pressed.
With the test-program, it also looks like pressing both left and right shift at the same time, does not work either - but that doesn't seem to have every worked in earlier versions of VICE. (Possibly it's my PC-keyboard that sucks)
As a real world example, you can test CyberTracker: https://csdb.dk/release/?id=25. If you press left-shift while moving the cursor, to mark a block, you can not move the cursor up or left in VICE 3.7.1/3.8.
It is of course possible this is not a bug, but a conscious descision you made somewhere between 3.5 and 3.7.1, but i'll let that be up to you.
Please tell exactly a) what OS b) what host locale c) what keymap and d) what host keyboard layout you are using
A quick check here indicates it all works as expected (for me anyway). I don't consider it a bug that left and/or right shift is pressed with a cursor key combination for that matter - not with a symbolic keymap anyway. BUT it should be possible to press both shift keys at the same time (and combined with the cursor keys too).
Last edit: gpz 2024-06-30
Yes, of course:
a) Windows 10
b) I guess the host locale is the "Windows display language" in windows? If so: "English (United States)"
c) I tried all the positional keymaps, for both of the host keyboard layouts in d).
d) Tried both Danish and US keyboard layout (selected in both Windows and under the "Host keyboard layout" setting in VICE)
Ok, thanks for testing. Do you mean that it works as in "cursor keys triggers right-shift, also while left-shift is held down", or do you mean that the current behavior is the expected behavior? (Incompatible with at least one C64 program - EDIT: Well, perhaps unless it's possible to press both left and right shift at the same time. Does that work for you?)
EDIT2: Oh, looks like you edited the post after i read it - updated the bullet-point numbering to match :)
Last edit: Algorithmix 2024-06-30
pressing both shift keys at the same time should work as expected (ie: both keys are registered in the emulation)
However, as soon as "virtual shift" comes into play (like with using "arrow up" for "cursor up") all bets are off. If you need this, you'll have to use a positional keymap, and press right shift+ arrow down for cursor up
Yes, ok - it is of course completely up to you guys. I just noticed the change, debugged what was going on, and reported my findings here, in case the change wasn't done on purpose.
And it's a pretty minor issue, of course. Maybe only 1 program incompatible with the new behavior. It just seems to me like the old way of consistenly using the same shift-key for the cursor-keys has a couple of advantages (works like i believe people use the cursor-keys on a real C64, C64-programs not forced to use both shift-keys for cursor-movements in order to be compatible with VICE). Not sure i see the advantage of the new behavior, but i'm sure it's there and that it was changed for a reason, and i have no way of knowing the history of this, so i'll shut up now. :)
You are right about the workaround.
I've tried two different computers and pressing both shift-keys together in VICE doesn't work on either of them, but since it works for you, i'm guessing that's just some weird stuff on my end.
Question: Does positional vs symbolic keymaps really make a difference here? I would think left-shift and right-shift would have the same positions and behaviors in both?
In this particular specific case (only SHIFT and cursor keys involved) it makes no difference - however generally IF you need to press specific keys a specific way, positional keymap is the right choice.
I'll have a look what happens here on windows.... next weekend :)
Any weirdness involving two shifts plus another key (or possibly other 3-or-more-key combinations) can also be messed up by your physical keyboard. Recently there was bug report 2038 https://sourceforge.net/p/vice-emu/bugs/2038/ where that seemed to be the case, at least when I tried it with my keyboard.
So if you have tools on your machine to show keyboard events (such as xev for X), you can try and see if the keyboard is even generating the keypresses you want it to.
it seems this was introduced somewhere here...
https://sourceforge.net/p/vice-emu/code/40678/
https://sourceforge.net/p/vice-emu/code/40679/
if that helps.
Yes. And as said - it works as expected (the first time ever since VICE was released). The "virtual shift" was buggy in various ways before.
I've added a note to the docs in r45205 which hopefully explains how this is expected to work.