Javascript ExtendScript-使用箭头键将焦点从搜索框转移到列表

Javascript ExtendScript-使用箭头键将焦点从搜索框转移到列表,javascript,focus,extendscript,arrow-keys,adobe-scriptui,Javascript,Focus,Extendscript,Arrow Keys,Adobe Scriptui,我有以下脚本: picked = myItems (['item 1', 'item 2', 'item 3', 'item 4', 'new item 1', 'new item 2']); function myItems (templates) { var w = new Window ('dialog {text: "Item List", alignChildren: "fill"}'); var entry = w.add ('edittext {active: true}

我有以下脚本:

picked = myItems (['item 1', 'item 2', 'item 3', 'item 4', 'new item 1', 'new item 2']); 


function myItems (templates) {
var w = new Window ('dialog {text: "Item List", alignChildren: "fill"}');

 var entry = w.add ('edittext {active: true}')
  entry.graphics.font= ScriptUI.newFont ("Arial", "Bold", 12);
 var list = w.add ('listbox', [0, 0, 200, 100], templates);
 list.selection = 0;

list.graphics.font= ScriptUI.newFont ("Arial", "Italic", 14);

entry.onChanging = function ()
{
var temp = entry.text,
 tempArray = [];
for (var i = 0; i < templates.length; i++)

 if (templates[i].toLowerCase().indexOf (temp) == 0)
tempArray.push (templates[i]);

else if (templates[i].toUpperCase().indexOf (temp) == 0)
tempArray.push (templates[i]);

if (tempArray.length > 0)
 {
 tempList = w.add ("listbox", list.bounds, tempArray, {scrolling: true});

 tempList.graphics.font= ScriptUI.newFont ("Times New Roman", "Regular", 14);
 w.remove(list);
 list = tempList;
 list.selection = 0;
 list.onDoubleClick=function(){

if (list.selected){
     var buttonname = list.selection.text
     var templatefile = new File (searchpath + "/" + buttonname + '.psd');
               mainfunction (templatefile)
}
w.close();
}
 }
} 

ListItem.add

 var B = w.add ('button', undefined, 'Ok', {name: 'ok'}) 


list.onDoubleClick=function(){

if (list.selected){
     var buttonname = list.selection.text
     var templatefile = new File (searchpath + "/" + buttonname + '.psd');
               mainfunction (templatefile)
}

w.close();
}

 if (w.show () != 2){
     var buttonname = list.selection.text
     var templatefile = new File (searchpath + "/" + buttonname + '.psd');
               mainfunction (templatefile)

 }
w.close();
}

但是,它不适用于Photoshop CC 2014。有人知道我可以更改什么以允许向后兼容吗?

查看Peter Kahrel的ScriptUI指南有一个关于聆听键盘和事件监听器的部分谢谢,我已经将该指南作为资源下载了。它帮助我创建了对话框和列表框,我正在努力使用的是过渡键盘功能,就像制表键一样。
    w.addEventListener ("keydown", function (kd) {pressed (kd)});
function pressed (k)
{
if (k.keyIdentifier === "Down" && entry.active = true)
    list.active = true;
    else if (k.keyIdentifier === "Up" && list.active = true)
    entry.active = true ;
    else 
list.scrolling = true;
}