Keir was also a politician, his allegiance to the Liberal Party. He was President of Edinburgh University Union and Liberal Association in 1928. He unsuccessfully stood as a Liberal parliamentary candidate on four occasions. The first occasion was at the unpromising Midlothian and Peebles Northern by-election in early 1929 at the age of 23. He came third polling 16.6%. The second occasion was again at Midlothian and Peebles Northern at the 1929 General Election a few months later. He again came third polling 23.4%.[6] The third occasion was at the 1931 General Election. He was Liberal candidate for winnable Roxburgh and Selkirk. He was hoping to oust the sitting Conservative MP, who in 1929 had a majority of 1,278 over the previous Liberal candidate. He lost to the Conservative this time by 3,974 in an election that was difficult for Liberal candidates challenging sitting members who also supported the National Government.[7] The fourth occasion was at the East Fife by-election in 1933. On this occasion his candidacy was complicated by him not being the adopted candidate of the local Liberal Association. They had adopted another candidate who was a supporter of the National Government, who stood as a 'Liberal National'. Keir received public support from David Lloyd George as well as some leading figures within the Liberal Party. However he was not formally supported by the Liberal Party nationally because the party were still partners in the National Government.[8] Unfortunately Keir, standing as an Independent Liberal, did not get sufficient local Liberal support to mount a decent campaign. He finished fourth with 7.6%. He did not stand for parliament again.[9]