the following only captures one keystroke at a time, but as long as the figure is active, no system shortcuts are executed, including shift F10, try it.
Let me show you how to use figure to capture keystrokes
clear all;close all;clc
S.fh = figure( 'units','pixels',...
'position',[500 500 200 260],...
S.tx = uicontrol('style','text',...
'position',[60 120 80 20],...
S2 = guidata(H);
P = get(S2.fh,'position');
selection = questdlg('Close This Figure?','Close Request Function','Yes','No','Yes');
Regarding the crux of the query
' .. to detect a keypress and initiate action based on what key was pressed and whether or not a given different key had been pressed first .. '
the variable b contains the log of all keystrokes, sequentially logged, so one can catch combinations like ctrl+S
One can build a 2 characters window and with a switch discern any string that should trigger desired events.
For the mouse capture, a start point for your development could be Rodney Thomson example, one of many examples compiled in a bundle available in the File Exchange to start learning GUI development, but also directly available here
[EDITED, copy righted code removed]
t = linspace(-5,5);
y = sinc(t);
f = figure;
plot(t, y, 'r');
set(f, 'WindowButtonMotionFcn', @(obj, event)cursorLocation(obj, event, 'BottomLeft', ' X: %.3f\n Y: %.3f', 'r'))
May be you can get all shortcuts overloaded with Java, the solution may be in the following reference:
Undocumented Secrets of MATLAB - Java Programming
author: Mr Yair Altman
ed: CRC Press
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance