tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.99k stars 1.71k forks source link

Problem with CAPS #146

Closed inoyatov closed 9 years ago

inoyatov commented 9 years ago

I have following define statement in my config.h under keyboard folder according README.md:

#ifndef CONFIG_H                                                                
#define CONFIG_H                                                                

#define LOCKING_SUPPORT_ENABLE                                                  
#define LOCKING_RESYNC_ENABLE                                                   

#define VENDOR_ID       0xFEED                                                  
#define PRODUCT_ID      0xCAFE   

And following keymap for fn0 in my keymap_hhkb.c file:

    /* Layer 1: HHKB mode (HHKB Fn)                                             
     * ,-----------------------------------------------------------.            
     * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|            
     * |-----------------------------------------------------------|            
     * |Caps |   |   |   |   |   |   |   |Psc|Slk|Pus|Up |   |Backs|            
     * |-----------------------------------------------------------|            
     * |      |VoD|VoU|Mut|   |   |  *|  /|Hom|PgU|Lef|Rig|Enter   |            
     * |-----------------------------------------------------------|            
     * |        |   |   |   |   |   |  +|  -|End|PgD|Dow|      |   |            
     * `-----------------------------------------------------------'            
     *       |   |     |                       |     |   |                      
     *       `-------------------------------------------'                      
     */                                                                         
    KEYMAP(PWR, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,   \   
          CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, BSPC,      \   
           TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT,            \
           TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS,            \
                TRNS,TRNS,          TRNS,               TRNS,TRNS),  

Instead of _CAPS I tried *LCAP_\ also. However when I release fn0 key and when I try to type keys all of them in lowercase. So, it is bug? or should I change something else?

P.S.: I am using TMK alt board rev. D.

tmk commented 9 years ago

LOCKING_SUPPORT is for mechanical lock switch like this Alps one. http://deskthority.net/wiki/Alps_SKCL_Lock

Using enabling LOCKING_SUPPORT and using LCAP keycode in keymap you can use physical locking Capslock key as you expected. For example, Apple Extended Keyboard(AEK) and AEK II have.

Old vintage mechanical keyboard occasionally has lock switch but modern ones including your HHKB don't have. You don't need LOCKING_SUPPORT for HHKB and just use CAPS for Capslock.

With default HHKB keymap you can register Capslock with FN0+Tab. This doesn't work for you?

tmk commented 9 years ago

Instead of CAPS I tried *LCAP also. However when I release fn0 key and when I try to type keys all of them in lowercase. So, it is bug? or should I change something else?

And this is expected behaviour, not a bug.

inoyatov commented 9 years ago

@tmk Ok i removed macro from header. And try again:

So, is it correct behavior?

tmk commented 9 years ago

hmm, weird. With default keymap(keymap_hhkb.c) I can use Capslock on Layer1 as expected. Internal LED works as capslock indicator, check the LED from window on the back.

Aren't you using remapping software or anything on OS? And can you see key codes coming from keyboard on your OS? You cat tools like 'xev' on Xorg or 'aquakeytest' on Windows.

inoyatov commented 9 years ago

Problem resolved. It is because "CAPS LOCK" mapped to "CTRL" using gnome-tweak-tool. Thank you for troubleshooting.

tmk commented 9 years ago

OK :) closed.

Habens commented 8 years ago

Hi tmk, With default keymap(keymap_hhkb.c) I can use Capslock on Layer1 as expected. The capslock indicator works fine on my mac keyboard, but not work on my gh60 keyboard. The PCB provider mentioned I should select Reverse on LED field in TMK. Is there anyway I can make the indicator works correct with modify the source code?

tmk commented 8 years ago

My codes supports only genuine GH60 designed by komar, not clones and derivatives. And TKG is not my code, I think it is creation of https://github.com/kairyu .

Anyway, you are in wrong place to ask. Consult with the seller.

Habens commented 8 years ago

Sorry for that. Already got the answer from kair.