a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add cmd-up / cmd-down to jump to blocks

+38
+38
components/SelectionManager.tsx
··· 40 40 let removeListener = addShortcut([ 41 41 { 42 42 metaKey: true, 43 + key: "ArrowUp", 44 + handler: async () => { 45 + let [firstBlock] = 46 + (await rep?.query((tx) => 47 + getBlocksWithType( 48 + tx, 49 + useUIState.getState().selectedBlock[0].parent, 50 + ), 51 + )) || []; 52 + if (firstBlock) focusBlock(firstBlock, { type: "start" }); 53 + }, 54 + }, 55 + { 56 + metaKey: true, 57 + key: "ArrowDown", 58 + handler: async () => { 59 + let blocks = 60 + (await rep?.query((tx) => 61 + getBlocksWithType( 62 + tx, 63 + useUIState.getState().selectedBlock[0].parent, 64 + ), 65 + )) || []; 66 + let folded = useUIState.getState().foldedBlocks; 67 + blocks.filter( 68 + (f) => 69 + !f.listData || 70 + !f.listData.path.find( 71 + (path) => 72 + folded.includes(path.entity) && f.value !== path.entity, 73 + ), 74 + ); 75 + let lastBlock = blocks[blocks.length - 1]; 76 + if (lastBlock) focusBlock(lastBlock, { type: "end" }); 77 + }, 78 + }, 79 + { 80 + metaKey: true, 43 81 altKey: true, 44 82 key: ["l", "¬"], 45 83 handler: async () => {