IF(ISKEYDOWN(#SHIFT) = 1)
IF($s = 0)
KEYDOWN(#CTRL)
ELSE
KEYUP(#CTRL)
END_IF
$s = $s ^ 1
WHILE(ISKEYDOWN(#SHIFT) = 1)
WAITMS(30)
END_CYC
END_IF
WAITMS(50)
//--------------------------------
// Проверка:
//
// IF(ISKEYDOWN(#CTRL) = 1)
// LOGWRITE ("DOWN")
// ELSE
// LOGWRITE ("UP")
// END_IF
Вариант без переключателя:
IF(ISKEYDOWN(#SHIFT))
IF(ISKEYDOWN(#CTRL))
KEYUP(#CTRL)
ELSE
KEYDOWN(#CTRL)
END_IF
WHILE(ISKEYDOWN(#SHIFT))
WAITMS(30)
END_CYC
END_IF
WAITMS(50)
//--------------------------------
// Проверка:
//
// IF(ISKEYDOWN(#CTRL) = 1)
// LOGWRITE ("DOWN")
// ELSE
// LOGWRITE ("UP")
// END_IF