I have a series of images that I'd like to display one at a time and be able to change something like the brightness or contrast by using keyboard keys (say up or down arrow) and when I'm satisfied with that image, use left or right arrows to move between images. To that end, I'd like to have some sort of function that, upon pressing a keyboard key, outputs a value that depends on the key pressed. I could do something like this with ginput, where the button output is 1, 2, or 3 depending on if I left, right, or middle click, but that would limit me to only 3 different options, while I want at least 4, if not 6 or 8 different options. Any ideas?
MATLAB: Use keyboard input to assign value to a variable
keyboard input
Best Answer