File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import MolangParser from "molangjs" ;
2- import { Keybinds } from "./keyboard" ;
2+ import { isMac , Keybinds } from "./keyboard" ;
33import tinycolor from "tinycolor2" ;
44
55type ActionEventName =
@@ -524,7 +524,7 @@ export class Action extends BarItem {
524524 updateKeybindingLabel ( ) : this {
525525 let keybind_text = this . keybind ?. toString ( ) || '' ;
526526 if ( ! keybind_text && this . id == 'color_picker' ) {
527- keybind_text = tl ( 'keys.alt' ) ;
527+ keybind_text = tl ( isMac ? 'keys.option' : 'keys.alt' ) ;
528528 }
529529 this . menu_node . querySelector ( '.keybinding_label' ) . textContent = keybind_text ;
530530 this . nodes . forEach ( node => {
Original file line number Diff line number Diff line change 11import { Blockbench } from "../api" ;
22import { translateUI } from "../languages" ;
33import { currentwindow } from "../native_apis" ;
4+ import { isMac } from "./keyboard" ;
45import { ResizeLine , setupResizeLines } from "./resize_lines" ;
56
67
@@ -754,7 +755,7 @@ onVueSetup(function() {
754755 <span>{{ tl(modifier_keys.shift.last()) }}</span>
755756 </div>
756757 <div class="status_bar_modifier_key" v-if="modifier_keys.alt.length" @click="clickModifiers()">
757- <kbd>${ tl ( 'keys.alt' ) } </kbd>
758+ <kbd>${ tl ( isMac ? 'keys.option' : 'keys.alt' ) } </kbd>
758759 <span>{{ tl(modifier_keys.alt.last()) }}</span>
759760 </div>
760761 </template>
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const KeymapPresets = {
1010 cinema4d,
1111 maya,
1212}
13- const isMac = window . SystemInfo ?. platform == 'darwin' || navigator . userAgent . includes ( 'Mac OS' ) ;
13+ export const isMac = window . SystemInfo ?. platform == 'darwin' || navigator . userAgent . includes ( 'Mac OS' ) ;
1414
1515export const Keybinds = {
1616 actions : [ ] ,
@@ -162,8 +162,8 @@ export class Keybind {
162162 if ( this . ctrl === null ) modifiers . push ( `[${ tl ( 'keys.ctrl' ) } ]` )
163163 if ( this . shift ) modifiers . push ( tl ( 'keys.shift' ) )
164164 if ( this . shift === null ) modifiers . push ( `[${ tl ( 'keys.shift' ) } ]` )
165- if ( this . alt ) modifiers . push ( tl ( 'keys.alt' ) )
166- if ( this . alt === null ) modifiers . push ( `[${ tl ( 'keys.alt' ) } ]` )
165+ if ( this . alt ) modifiers . push ( tl ( isMac ? 'keys.option' : 'keys.alt' ) )
166+ if ( this . alt === null ) modifiers . push ( `[${ tl ( isMac ? 'keys.option' : 'keys.alt' ) } ]` )
167167 if ( this . meta ) modifiers . push ( tl ( 'keys.meta' ) )
168168 if ( this . meta === null ) modifiers . push ( `[${ tl ( 'keys.meta' ) } ]` )
169169
@@ -451,7 +451,7 @@ export class Keybind {
451451 let modifiers = [ ] ;
452452 if ( event . ctrlKey ) modifiers . push ( tl ( 'keys.ctrl' ) )
453453 if ( event . shiftKey ) modifiers . push ( tl ( 'keys.shift' ) )
454- if ( event . altKey ) modifiers . push ( tl ( 'keys.alt' ) )
454+ if ( event . altKey ) modifiers . push ( tl ( isMac ? 'keys.option' : 'keys.alt' ) )
455455 if ( event . metaKey ) modifiers . push ( tl ( 'keys.meta' ) )
456456
457457 modifiers . forEach ( ( text , i ) => {
Original file line number Diff line number Diff line change 185185 "keys.ctrl" : " Ctrl" ,
186186 "keys.shift" : " Shift" ,
187187 "keys.alt" : " Alt" ,
188+ "keys.option" : " Option" ,
188189 "keys.meta" : " Cmd" ,
189190 "keys.delete" : " Delete" ,
190191 "keys.space" : " Space" ,
You can’t perform that action at this time.
0 commit comments