Your problem is that xK_2 larger than xK_0 , so the list [xK_2 .. xK_0] empty:
Prelude XMonad> xK_2 50 Prelude XMonad> xK_0 48 Prelude XMonad> [xK_2 .. xK_0] []
You will need to use a longer list. There are at least two reasonable ways to do this; you just need to specify all the keys yourself:
Prelude XMonad> [xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0] [50,51,52,53,54,55,56,57,48]
What I would use is a little shorter:
Prelude XMonad> [xK_2 .. xK_9] ++ [xK_0] [50,51,52,53,54,55,56,57,48]
Remember to add some parentheses if they are part of a larger expression.
Daniel Wagner
source share