I need to check if Shift key is pressed. More exactly I would like to set dired switches depending on whether Shift is pressed.
(defadvice find-file-noselect (around find-file-noselect-set-switches activate)
(let ((switches dired-listing-switches))
;; check if shift is pressed and set or not an "R" switch
(setq dired-listing-switches "-lhRA")
ad-do-it
(setq dired-listing-switches switches)))
Of course, I can have different shortcuts for different dired switches, but I would like to change my switches dynamically during choosing a directory for dired.