我正在使用 javascript 中的 ctrl+c 和 ctrl+v 事件我想在 ctrl+v 事件上绑定一个函数。我可以在 Windows 系统中使用 event.keyCode 来做到这一点,但在 mac os on command press 我无法弄清楚该事件。我的代码是
 $('.hindi_content').keyup(function(event){
        console.log('UP'+event.keyCode);
       console.log('in window::'+ event.ctrlKey+'in mac os'+event.metaKey+'####'+event.META_MASK+'##$&&'+event.CTRL_MASK);
      //  this is  working with windows not with mac os. 
       if(event.keyCode==86 && event.ctrlKey)
        {
            console.log('ctrl press'+event.ctrlKey);
            col_val = $('#'+this.id).val();
            console.log('col val'+col_val);
            $('#hidden_'+this.id).val(col_val);
            console.log('hidden val'+ $('#hidden_'+this.id).val());
            //converter_new(event,this.lang);
            // return;
        } 
});
我搜索并找到了 event.metaKey 但它是 mac 中的 ctrl 键我只想要 mac os 中的命令键。