The
%KeyboardLayout%
token (v8+) returns the current keyboard layout name.