Language options on M60

Hello everyone
Out of curiosity has anyone managed to make the different layers be language specific? So for example one layer giving access to language specific characters?

i configured the M60 to have the ANSI layout, but to issue Italian accented letters by pressing Space+letter. But of course you have to put the computer to get Italian Keyboard… here’s my code.py:

from PYKB import *
keyboard = Keyboard()

def _S(a):
    return MODS_KEY(MODS(RSHIFT), a)

def _A(a):
    return MODS_KEY(MODS(RALT), a)

# layer definitions
QWERT=0
SHIFT=1
FUNCT=2
BLUET=3
ACCEN=4

# constants
___ = TRANSPARENT
XXX = NO
BOOT = BOOTLOADER

# navigation
NAVU = LAYER_TAP(SHIFT, UP)
NAVL = LEFT
NAVD = LAYER_TAP(FUNCT, DOWN)
NAVR = MODS_TAP(MODS(RCTRL), RIGHT)

LB = LAYER_TAP(BLUET, B)
SENT = MODS_TAP(MODS(RSHIFT), ENTER)
ACCE = LAYER_TAP(ACCEN, SPACE)

# shift-del & Ctrl-CAPS
SCC = MODS_TAP(MODS(RCTRL), CAPS)
SDEL = LAYER_TAP(SHIFT, DEL)

# ITALIAN DEFINITIONS
IT_EGRV='['
IT_AGRV='\''
IT_UGRV='\\'
IT_IGRV='='
IT_OGRV=';'
IT_EURO=_A(E)
IT_EXCL=_S(1)
IT_AT  =_A(';')
IT_SHRP=_A('\'')
IT_DOLL=_S(4)
IT_PERC=_S(5)
IT_POWE=_S('=')
IT_ECOM=_S(6)
IT_STAR=_S(']')
IT_LPAR=_S(8)
IT_RPAR=_S(9)
IT_EQAL=_S(0)
IT_MINU='/'
IT_PLUS=']'
IT_UNDS=_S('/')
IT_LSQR=_A('[')
IT_RSQR=_A(']')
IT_LBRK=_A(_S('['))
IT_RBRK=_A(_S(']'))
IT_SCLN=_S(',')
IT_COLN=_S('.')
IT_QUOT='-'
IT_DQUO=_S(2)
IT_COMM=','
IT_FULL='.'
IT_SLSH=_S(7)
IT_QSTN=_S('-')
IT_MINO=' ' # TODO
IT_MAJO=' ' # TODO
IT_BSLS=' ' # TODO
IT_PIPE=' ' # TODO

keyboard.keymap = (
    # layer 0 QWERTY
    (
        ESC,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0, IT_MINU, IT_EQAL, BACKSPACE,
        TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, IT_LSQR, IT_RSQR, '|',
        SCC,   A,   S,   D,   F,   G,   H,   J,   K,   L, IT_SCLN, IT_QUOT,    SENT,
        SDEL,  Z,   X,   C,   V,  LB,   N,   M, IT_COMM, IT_FULL, IT_SLSH,         NAVU,
        LCTRL, LALT, LGUI,          ACCE,            RALT, NAVL,  NAVD, NAVR
    ),

    # layer 1 SHIFT
    (
        ESC, IT_EXCL, IT_AT, IT_SHRP, IT_DOLL, IT_PERC, IT_POWE, IT_ECOM, IT_STAR, IT_LPAR, IT_RPAR, IT_UNDS, IT_PLUS, BACKSPACE,
        TAB,   _S(Q), _S(W),   _S(E),   _S(R),   _S(T),   _S(Y),   _S(U),   _S(I),   _S(O),   _S(P), IT_LBRK, IT_RBRK, '|',
        SCC,   _S(A), _S(S),   _S(D),   _S(F),   _S(G),   _S(H),   _S(J),   _S(K),   _S(L), IT_COLN, IT_DQUO,    _S(ENTER),
        SDEL,  _S(Z), _S(X),   _S(C),   _S(V),   _S(B),   _S(N),   _S(M), IT_MINO, IT_MAJO, IT_QSTN, _S(UP),
        _S(LCTRL), _S(LALT), _S(LGUI),              ACCE,             _S(RALT), _S(LEFT),  _S(DOWN), _S(RIGHT)
    ),

    # layer 2 FUNCT
    (
        '`',  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12, DEL,
        XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,SUSPEND,AUDIO_VOL_DOWN,AUDIO_VOL_UP,AUDIO_MUTE,
        XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,      XXX,
        XXX, XXX, XXX, XXX, XXX,BOOT, XXX,MACRO(0), XXX, XXX, XXX,       XXX,
        XXX, XXX, XXX,                XXX,               XXX, XXX, XXX,  XXX
    ),

    # layer 3 BLUET
    (
        BT_TOGGLE,BT1,BT2, BT3,BT4,BT5,BT6,BT7, BT8, BT9, BT0, XXX, XXX, XXX,
        XXX, XXX, XXX, XXX, XXX, XXX,XXX,USB_TOGGLE,XXX,XXX,XXX,XXX,XXX, XXX,
        XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,      XXX,
        XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,           XXX,
        XXX, XXX, XXX,                XXX,               XXX, XXX, XXX,  XXX
    ),

    # layer 4 ACCEN
    (
        '`', XXX,    XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,
        XXX, IT_EURO,XXX, IT_EGRV, XXX, XXX, XXX, IT_UGRV,IT_IGRV,IT_OGRV, XXX, XXX, XXX, XXX,
        XXX, IT_AGRV,XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,      XXX,
        XXX, XXX,    XXX, XXX, XXX,   XXX, XXX, XXX, XXX, XXX, XXX,           XXX,
        XXX, XXX,    XXX,                XXX,               XXX, XXX, XXX,  XXX
    ),
)

keyboard.verbose = False

keyboard.run()

Thank you so much for the answer, I see over your code and it looks not to difficult to do, but I guess based on this and the USB-HID standard that it will not be possible to have several languages in different layers, any experience with that?

Nope, without any software on your PC, it will not be possible to have multiple languages…