Does dismounting trigger the GCD? I don't remember right now....
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh
(remove the [nomounted] if you want to see the error message from Levitate)
It won't work in one key-press if you are mounted because it takes time for you to dismount - the /dismount command doesn't trigger the GCD, but it takes at least the server round-trip time to actually perform the dismount (if you are mounted), plus any additional delay the server introduces. If you aren't mounted, then /dismount does nothing.
That macro is what I use anyway (wrote it after riding off the Aldor tower while using the wrong mount, and not being able to lev because I was mounted, d'oh!)
Oh, you might also want to change this to something like the following when you get a flying mount: