
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
onyx-navigation
Advanced tools
A library to handle d-pad navigation in KaiOS.
npm install onyx-navigation
onyx:blurFired on an element when it loses focus.
onyx:focusFired on an element when it gains focus.
onyx:selectFired on the focused element when the Enter key is pressed.
onyx:softleftFired on the focused element when the SoftLeft key is pressed.
onyx:softrightFired on the focused element when the SoftRight key is pressed.
data-onyx-group-idMarks an element as an Onyx group.
data-onyx-scrollerMarks an element as an Onyx scroller. You need one of these in each Onyx group. This is the element that your items will scroll in.
data-onyx-item-idMarks an element as an Onyx item. This must be a unique value per Onyx group.
data-onyx-focusedWhen an element is focused, it gains this attribute.
data-onyx-shortcutThis lets you tie an element to a 1-9 number key. Pressing one of these keys will fire onyx:focus and onyx:select on the marked element.
OnyxNavigation.startListening();
document.addEventListener('onyx:focus', (ev) => {
console.log(`Item ${ev.detail.itemId} in group ${ev.detail.groupId} focused`);
});
document.addEventListener('onyx:blur', (ev) => {
console.log(`Item ${ev.detail.itemId} in group ${ev.detail.groupId} blurred`);
});
document.addEventListener('onyx:select', (ev) => {
console.log(`Item ${ev.detail.itemId} in group ${ev.detail.groupId} selected`);
});
document.addEventListener('onyx:softleft', (ev) => {
console.log(`Item ${ev.detail.itemId} in group ${ev.detail.groupId} softleft`);
});
document.addEventListener('onyx:softright', (ev) => {
console.log(`Item ${ev.detail.itemId} in group ${ev.detail.groupId} softright`);
});
<div class="content" data-onyx-group-id="main">
<div class="scroller" data-onyx-scroller>
<div class="row">
<div class="item" data-onyx-item-id="row1_item1" data-onyx-shortcut="1"></div>
<div class="item" data-onyx-item-id="row1_item2" data-onyx-shortcut="2"></div>
<div class="item" data-onyx-item-id="row1_item3" data-onyx-shortcut="3"></div>
</div>
<div class="row">
<div class="item" data-onyx-item-id="row2_item1" data-onyx-shortcut="4"></div>
<div class="item" data-onyx-item-id="row2_item2" data-onyx-shortcut="5"></div>
<div class="item" data-onyx-item-id="row2_item3" data-onyx-shortcut="6"></div>
</div>
<div class="row">
<div class="item" data-onyx-item-id="row3_item1" data-onyx-shortcut="7"></div>
<div class="item" data-onyx-item-id="row3_item2" data-onyx-shortcut="8"></div>
<div class="item" data-onyx-item-id="row3_item3" data-onyx-shortcut="9"></div>
</div>
</div>
</div>
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.