Hammerspoon Scripts changing input language for multilingual person

Introduction

When I use Macbook, I usually change input languages between Korean and Japanese. After Sierra launched, It’s easy to change between Mother Language and English by pressing capslock. But, getting into Japanese from English, I still have trouble comming back into Korean by pressing control+space. So, I want to let control+space switch Languages except English, capslocktoggle between English and previous Language. Magically, Although I set input language English, control+space will never mind of…