Oh wow I think I got it!
I just had to add the brackets to the “and not” statement. So with the following code, the slider does not change anymore once ‘8’ was pressed!
Thank you so much!!!
keys = event.getKeys()
if len(keys):
keypresses.append(keys)
if '7' in keys and not ['8'] in keypresses:
AttractivenessSlider.markerPos = AttractivenessSlider.markerPos - 1
elif '9' in keys and not ['8'] in keypresses:
AttractivenessSlider.markerPos = AttractivenessSlider.markerPos + 1