Shift Key Scan Codes on Windows vs. Mac


Author
Message
Sadek
Sadek
Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)Associate Member (87 reputation)
Group: Forum Members
Posts: 7, Visits: 32
Hi there. I am creating an experiment where ideally I would choose non-letter based response keys that are far apart from each other on a keyboard. I set out to use the two shift keys (left and right, which correspond to scan codes 42 and 54, respectively). I am using a Windows OS and this experiment logs everything correctly if running on a Windows OS, but not on a Mac (Apple) OS. It appears that the left and right shift key scan codes on a Mac OS are 42 for both. Therefore, data collection does not distinguish between the two response keys. The easy solution to this problem would be to use other keys. However, as I mentioned, I would prefer non-letter keys, and keys that are physically far apart from each other. I have noticed other threads reporting scan code issues on a mac, however, I haven't seen any with this particular issue (unless I missed it). If this is a problem that has no solution, then I'll opt for the easy way, however, if there is a way to correct this, that would be great and could be beneficial for other users of this program. Thank you.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Sadek - 10/5/2020
Hi there. I am creating an experiment where ideally I would choose non-letter based response keys that are far apart from each other on a keyboard. I set out to use the two shift keys (left and right, which correspond to scan codes 42 and 54, respectively). I am using a Windows OS and this experiment logs everything correctly if running on a Windows OS, but not on a Mac (Apple) OS. It appears that the left and right shift key scan codes on a Mac OS are 42 for both. Therefore, data collection does not distinguish between the two response keys. The easy solution to this problem would be to use other keys. However, as I mentioned, I would prefer non-letter keys, and keys that are physically far apart from each other. I have noticed other threads reporting scan code issues on a mac, however, I haven't seen any with this particular issue (unless I missed it). If this is a problem that has no solution, then I'll opt for the easy way, however, if there is a way to correct this, that would be great and could be beneficial for other users of this program. Thank you.

The problem has no solution currently; the cross-platform framework Inquisit relies on (Qt) does not distinguish between left vs right modifier keys under MacOS and always reports the value for the left modifier key, even if the corresponding right modifier key is pressed. However, this issue fairly recently got patched by Qt ( https://codereview.qt-project.org/c/qt/qtbase/+/313601 ) and distinguishing left vs right modifier keys should become possible in the not too distant future. For the time being, though, the only viable option is to switch to different response keys, I'm afraid.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search