Your problem is that xK_2
is bigger than xK_0
, so the list [xK_2 .. xK_0]
is empty:
Prelude XMonad> xK_2
50
Prelude XMonad> xK_0
48
Prelude XMonad> [xK_2 .. xK_0]
[]
You'll want to use a bit longer list than that. There's at least two reasonable ways to do this; one is to just specify all of keys yourself manually:
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 probably use is a bit shorter:
Prelude XMonad> [xK_2 .. xK_9] ++ [xK_0]
[50,51,52,53,54,55,56,57,48]
Remember to add some parentheses if it's part of a bigger expression.