Custom Keyboard Layout to use H J K L as ARROWS not working properly

Solution 1:

Go to xkb/types/iso9995 and edit the "THREE_LEVEL" type by adding

  preserve[Shift+LevelThree] = Shift;

so it looks like this

  partial default xkb_types "default" {

// A key type which can be used to implement
// an ISO9995-style level-three shift.

virtual_modifiers LevelThree;

type "THREE_LEVEL" {
    modifiers = Shift+LevelThree;
    map[None] = Level1;
    map[Shift] = Level2;
    map[LevelThree] = Level3;
    map[Shift+LevelThree] = Level3;
    preserve[Shift+LevelThree] = Shift;
    level_name[Level1] = "Base";
    level_name[Level2] = "Shift";
    level_name[Level3] = "Level3";
    };
};

Then go to your symbols file and use this format

    key <AC06>  { type="THREE_LEVEL", [               h,               H,            Left ]     }; 
    key <AC07>  { type="THREE_LEVEL", [               j,               J,            Down ]     }; 
    key <AC08>  { type="THREE_LEVEL", [               k,               K,              Up ]     }; 
    key <AC09>  { type="THREE_LEVEL", [               l,               L,           Right ]     }; 

This is a related question from which I could figure out the answer to yours.