I’ve mapped Caps Lock to EN and Shift + Caps Lock to RU. Really stopped thinking about “what keyboard layout is on rn”, just subconsciously press Caps every time I start typing something in English. Pretty easy to replicate with Karabiner on macOS (and on Linux it’s supported out of the box).
If you really want a dedicated keyboard though yeah, would be a bit harder but might be possible to do something with Karabiner as well. The device_if condition might work here: https://karabiner-elements.pqrs.org/docs/json/complex-modifi...
Edit: this might work but I haven’t tried:
{
"manipulators": [
{
"type": "basic",
"from": {
"any": "key_code",
"modifiers": { "optional": ["any"] }
},
"to": [
{ "select_input_source": { "language": "^ja$" } },
{ "from_event": true }
],
"conditions": [
{
"type": "device_if",
"identifiers": [{ "vendor_id": 1111, "product_id": 2222 }]
}
]
}
]
}