ijprest / keyboard-layout-editor

Web application to enable the design & editing of keyboard layouts
http://www.keyboard-layout-editor.com/
Other
1.3k stars 241 forks source link

Numpad Keys bad display #253

Closed ArmynC closed 5 years ago

ArmynC commented 5 years ago

The numpads PLUS and ENTER keys are broken when I changed the height... It should be orange over all the key...

capture

.keytop { 
    height: 38px !important; 
}

.keylabel9, .keylabel10, .keylabel11 { 
    margin-top: -3px;
}
ijprest commented 5 years ago

That's what I meant by my "this won't work well if you have any keys > 1u tall" comment in #252. :)

You can do something like this, though. Adjust & repeat as necessary for other key heights.

.keytop[style*="height: 42px;"] { 
    height: 38px !important; 
}
.keytop[style*="height: 96px;"] { 
    height: 92px !important; 
}
ArmynC commented 5 years ago

Oh, I thought first time that was about that .keyborder.. anyway it works :)

One more question.. with all of these modifications the key "Homing" (that key bump) isn't visible anymore.. how I can restore or mimic it?

ijprest commented 5 years ago

The homing bump (on DCS/OEM/normal profile keycaps) is done with a background image on the .keylabels div, which we'd need to move up (background-position).

There's unfortunately no way (currently) to target the homing keys individually/directly. However, since this is probably the only background-image on any .keylabels, you can probably get away with this:

.keylabels {
  background-position: center 80%; /*default is 90%*/
}
ArmynC commented 5 years ago

It works, thanks!