Space to Switch to Hand Tool in Tile Palette?

Hi I just download a Utility called: Hold Spacebar for Hand (drag) Tool

I read the code and I can understand it, but now I wondering how can I modify this to support the same functionality but works in Tile Palette tab, thanks!

enter image description here