0
我正在做一個綠屏轉換,我需要在每個視圖上覆制大約20個左右的熱鍵。我有這樣的作爲顯示primefaces hotkeys全部觸發
<h:form>
<p:hotkey id="hotkeyCtlShiftA" bind="ctl+shift+a" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftA}" />
<p:hotkey id="hotkeyCtlShiftS" bind="ctl+shift+s" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftS}" />
<p:hotkey id="hotkeyCtlShiftD" bind="ctl+shift+d" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftD}" />
<p:hotkey id="hotkeyAltF1" bind="alt+f1" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runAltF1}" />
<ul class="nav nav-pills nav-stacked hotkeyPill">
<li><p:commandLink id="cmdCtlShiftA"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftA}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+a" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdCtlShiftS"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftS}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+s" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdCtlShiftD"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftD}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+d" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdAltF1"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runAltF1}"
style="margin-right:20px;">
<h:outputText value="alt+f1" />
</p:commandLink>
</li>
</ul>
</h:form>
側面菜單欄現在,如果我在導航欄(命令鏈接)它完美的作品點擊菜單按鈕。但是,如果擊中熱鍵,例如ctl + shift + a,它將觸發所有熱鍵,而不僅僅是A鍵。爲什麼會發生這種情況?
即時使用Primeface 4.0